Board index » Visual Studio » VB.NET & Access Database

VB.NET & Access Database

Visual Studio372
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


-
 

Re:VB.NET & Access Database

Hi Si



=DBnull.value were a lot of answers before christmas I thought



Cor





Quote
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





-

Re:VB.NET & Access Database

Hi,



Use nothing instead.



Ken

---------------

"Newbie!" <s_j_green_2000@yahoo.co.uk>wrote in message

Quote
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









-

Re:VB.NET & Access Database

I carn`t seem to find them, my News reader seems to have deleted them:(



Ta

Si



"Newbie!" <s_j_green_2000@yahoo.co.uk>wrote in message

Quote
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









-

Re:VB.NET & Access Database

Hi ken, where do i use nothing?



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



Ta

Si





"Newbie!" <s_j_green_2000@yahoo.co.uk>wrote in message

Quote
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









-

Re:VB.NET & Access Database

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!" <s_j_green_2000@yahoo.co.uk>wrote in message

Quote
Hi ken, where do i use nothing?



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



Ta

Si





"Newbie!" <s_j_green_2000@yahoo.co.uk>wrote in message

news:L-2cna_ytJB3nW2iSa8jmw@karoo.co.uk...

>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

>

>









-

Re:VB.NET & Access Database

"Newbie!" <s_j_green_2000@yahoo.co.uk>schrieb

Quote
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)





--

Armin



www.plig.net/nnq/nquote.html">www.plig.net/nnq/nquote.html

www.netmeister.org/news/learn2quote.html">www.netmeister.org/news/learn2quote.html



-

Re:VB.NET & Access Database

Hi Newbie,



Seeing all those answers,



Quote
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







-

Re:VB.NET & Access Database

* "Armin Zingler" <az.nospam@freenet.de>scripsit:

Quote
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.



--

Herfried K. Wagner [MVP]

<www.mvps.org/dotnet>">www.mvps.org/dotnet>

-

Re:VB.NET & Access Database

* "Newbie!" <s_j_green_2000@yahoo.co.uk>scripsit:

Quote
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



\\\

<...>= DbNull.Value

///



Quote
This code was generatedm, When I generated my Dataset.



:-(



--

Herfried K. Wagner [MVP]

<www.mvps.org/dotnet>">www.mvps.org/dotnet>

-

Re:VB.NET & Access Database

"Cor" <non@non.com>schrieb

Quote
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?





The default property of a datarow is the item property. You can pass either

an index or a datacolumn object.





--

Armin



-

Re:VB.NET & Access Database

Hi Armin,



There was an type error,



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

It had to be

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



Quote
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







-

Re:VB.NET & Access Database

"Cor" <non@non.com>schrieb

Quote
Hi Armin,



There was an type error,



>>tablepaswordList.rows(0).item"CreatedOnColumn"

>>=system.dbnull.value

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?





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.





--

Armin



www.plig.net/nnq/nquote.html">www.plig.net/nnq/nquote.html

www.netmeister.org/news/learn2quote.html">www.netmeister.org/news/learn2quote.html



-

Re:VB.NET & Access Database

Hi Armin,



Quote
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





-