VB.NET & Access Database

  • Thread starter Thread starter Newbie!
  • Start date Start date
N

Newbie!

Hi Group, hope you all had a great Xmas/Holiday?

Just a quick one, i know i`ve asked this before but totally forgot the
answer.

When i run my prog i get a error saying 'Conver' is not a member of 'String'
on the following code:

Public Sub SetCreatedOnNull()
Me(Me.tablePasswordList.CreatedOnColumn) = System.Convert.DBNull
End Sub

This code was generatedm, When I generated my Dataset.

Thanks for your Help

Regards
Si
 
Hi ken, where do i use nothing?

Me(Me.tablePasswordList.CreatedOnColumn) = System.Convert.Nothing ????

Ta
Si
 
Hi,

I am not sure what Me(Me.tablePasswordList.CreatedOnColumn) is
suppose to do. But if that is a string this will work.

Me(Me.tablePasswordList.CreatedOnColumn) = Nothing

Ken
-------------------
 
* "Newbie! said:
When i run my prog i get a error saying 'Conver' is not a member of 'String'
on the following code:

Public Sub SetCreatedOnNull()
Me(Me.tablePasswordList.CreatedOnColumn) = System.Convert.DBNull
\\\

This code was generatedm, When I generated my Dataset.

:-(
 
Newbie! said:
Hi Group, hope you all had a great Xmas/Holiday?

Just a quick one, i know i`ve asked this before but totally forgot
the answer.

When i run my prog i get a error saying 'Conver' is not a member of
'String' on the following code:

Public Sub SetCreatedOnNull()
Me(Me.tablePasswordList.CreatedOnColumn) =
System.Convert.DBNull
End Sub

This code was generatedm, When I generated my Dataset.

That's really a bad thing! (not you but the problem *g*)

You've got a table with a field named "System". The field is added as a
property to your typed Dataset. Consequently, the code
"System.Convert.DBnull" is not resolved to System.Convert.DBNull within
mscorlib.dll. Instead the name "System" is resolved to the property in the
class. As the property is of type String, System.Convert.DBNull is actually
resolved to System.String.Convert.DBnull - which does not exist.

I don't think there is a way around... but let's wait for more answers.


BTW, I've always wanted a "root" character to be able to write something
like

Me(Me.tablePasswordList.CreatedOnColumn) = \System.Convert.DBNull

(note the backslash)
 
Hi Newbie,

Seeing all those answers,
Me(Me.tablePasswordList.CreatedOnColumn) = System.Convert.DBNull

What is this
me(me.tablepasswordlist.createdOnColumn)

I remember me from last time that Herfried said that that me(me) was useless

If it is a datatable I think there has to be a rownumber,

It can be something as

tablepaswordList.rows(0).item"CreatedOnColumn"=system.dbnull.value

I hope this helps a little bit?

Cor
 
* "Armin Zingler said:
BTW, I've always wanted a "root" character to be able to write something
like

Me(Me.tablePasswordList.CreatedOnColumn) = \System.Convert.DBNull

(note the backslash)

LOL -- Nice idea.
 
Cor said:
Hi Newbie,

Seeing all those answers,


What is this
me(me.tablepasswordlist.createdOnColumn)

I remember me from last time that Herfried said that that me(me) was
useless

If it is a datatable I think there has to be a rownumber,

It can be something as

tablepaswordList.rows(0).item"CreatedOnColumn"=system.dbnull.value

I hope this helps a little bit?


The default property of a datarow is the item property. You can pass either
an index or a datacolumn object.
 
Hi Armin,

There was an type error,
It had to be
tablepaswordList.rows(0).item("CreatedOnColumn")=system.dbnull.value
The default property of a datarow is the item property. You can pass either
an index or a datacolumn object.

And then it is as far as I know
tablepaswordList.rows(0)("CreatedOnColumn")=system.dbnull.value or
tablepaswordList.rows(0)(0)=system.dbnull.value

That I did use in past in my samples, but I find this more complete now.

Or do I see something wrong?

Cor
 
Cor said:
Hi Armin,

There was an type error,

It had to be
tablepaswordList.rows(0).item("CreatedOnColumn")
=system.dbnull.value


And then it is as far as I know
tablepaswordList.rows(0)("CreatedOnColumn")= system.dbnull.value
or tablepaswordList.rows(0)(0)=system.dbnull.value

That I did use in past in my samples, but I find this more complete
now.

Or do I see something wrong?


Maybe *I* see something wrong, but...

I think that within the datarow class itself you don't have to refer to the
table or to a row in the table.
 
Hi Armin,
Maybe *I* see something wrong, but...

I think that within the datarow class itself you don't have to refer to the
table or to a row in the table.
A problem with this is that when you make a dataset using the designer, it
makes a datasetclass with which you can return properties using a function,
but that you do not see because it is all made for you)

Without that it would be if you are right

tablepaswordList(0)=system.dbnull.value
But giving a datarow the name tablepasswordList brrrrrrrrr

For me this can be EOT

Cor
 
Back
Top