0

How to connect vb.net to access database

The code won't run https://code.sololearn.com/cCV5cqifP12H/?ref=app

12th Mar 2019, 1:33 PM
Lucky
Lucky - avatar
5 Antworten
+ 2
I haven't been working with vb.net much but I think you have a full stop in the Values instead of comma. Could you please check? Also, maybe you should bind parameters something like: objcmd.Parameters.AddWithValue("?", @IdNo) What kind of error are you getting?
12th Mar 2019, 6:24 PM
dρlυѕρlυѕ
dρlυѕρlυѕ - avatar
+ 2
Oki, but here in your code the first one is a full stop : Dim strSql As String = "INSERT INTO Census([IdNo],[FirstName], [MiddleName], [Surname], [Password]) VALUES(?.?,?,?,?)" Have you tried anything else?
13th Mar 2019, 4:28 PM
dρlυѕρlυѕ
dρlυѕρlυѕ - avatar
0
No it's a comma I can't send you an image
13th Mar 2019, 4:20 PM
Lucky
Lucky - avatar
0
yeah I have created a connection between the database and vb
13th Mar 2019, 4:29 PM
Lucky
Lucky - avatar
0
Hi
14th Mar 2019, 9:40 PM
Ilie Chitu
Ilie Chitu - avatar