Problem With DB

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

Newbie!

Hi Ppl,

Could someone Help a newbie?

I keep getting:

'Convert' is not a memeber of 'string'

Here is my code:

Public Function IsWeb_AddressNull() As Boolean
Return Me.IsNull(Me.tablePasswords.Web_AddressColumn)
End Function

Public Sub SetWeb_AddressNull()
Me(Me.tablePasswords.Web_AddressColumn) = System.Convert.DBNull
End Sub

Its a Access Database in VB.Net

Thanks for any help
Si
 
Hi Newbie,

I see not direct what you are doing, but something gives me the idea, that
you just are looking for "dbnull.value" (the Null (empty) value from a
database item)?

Maybe you can describe what kind of result you want?

Cor
 
Hi Con,

Thanks for your reply.

I have a Table in Access setup as follows:-

ID (Primary Key)
System
UserName
Password
Web Address
Additional Information

On my Project I added the OleDBadapter - All Ok my database connected no
Problems

When I try to create my Dataset it errors, and tell me to Re-Build when I
rebuild it comes up saying 'Convert' is not a memeber of 'string'

All I want is a Datagrid with the Info in, and simply be able to Change the
Data on a Record, Add Records, Delete Records. Thats it, obviously some
feild will have nothing in, so they would need to just show a blank.

I`ve tryed using the Dataform wizard but with the same results.

I`ve also tryed the above using SQL server for the DB but again, same
problem:(

Thanks again for you help and time

Regards
Si
 
Hi Newbie,

Difficult problem, I did made something but that would maybe bring you in
the wrong direction.
When I try to create my Dataset it errors, and tell me to Re-Build when I
rebuild it comes up saying 'Convert' is not a memeber of 'string'

Do you know what "Convert" is ?

Cor
 
He Cor

Not got a Clue what convert is, Im quite new to VB.NET i`ve tryed
everything, just end up back at the same problem

Thanks again for your help

Regards
Si
 
Hi Newbie,

This is a lot of cut and paste from a simple webapp example.
Normaly this would be sufficient to show your table in a datagrid
(It is a webform one, it does not update or anything only show the datagrid)

I was a long while not using the datagrid, but maybe this help you to
overcome your first problems.

But when you want to use this for updates you have to go investigating for
that yourself (I use another method)

It is cut and paste and typing so try it if you want and if there are typos
correct them yourself

\\\\
Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data
Source=C:\yourAssess.mdb"
Dim Conn As New OleDbConnection(connString)
Dim sqlStr As String = "SELECT * FROM YourPassWordTabel"
Dim cmd As New OleDbCommand(sqlStr, Conn)
Dim ds As New DataSet
Dim da As New OleDbDataAdapter(cmd)
da.Fill(ds)
Me.DataGrid1.DataSource = ds.Tables(0)
Me.DataGrid1.DataBind()
///

I hope this helps a little bit?

Cor
 
Back
Top