Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42334

VS 2008 Insert Into Access Database , Syntax error in insert Statement

$
0
0
hey all, i need some help with access database !!
i've been working with SQL Server 2008 and it was all fine, but now i'm required to use access database


here is my code, and i keep getting same err : Syntax error in insert Statement

Code:


Dim sCon As New OleDbConnection
Dim com As New OleDbCommand("INSERT INTO [User](Password, UserName, SSID, [DOB], Address, PhoneNb) VALUES('" & TextBox3.Text & "','" & TextBox1.Text & "','" & TextBox4.Text & "'," & DateTimePicker1.Text & ",'" & TextBox5.Text & "','" & TextBox6.Text & "')", sCon)

                        sCon.ConnectionString = connectionString  ' Already given!!
                        sCon.Open()
                        com.ExecuteNonQuery()
                        sCon.Close()


i cant find what i did wrong :(
anyone can help !?

Viewing all articles
Browse latest Browse all 42334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>