Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27189

i have error saving in database

$
0
0
hello guys,

please help me to fix my problem.. i am trying to add record in my database in mysql.. i have this codes below:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
rs = New ADODB.Recordset
rs.Open("insert into employee values('" & txtid.Text & "','" & txtname.Text & "','" & txtaddress.Text & "','" & cmbgender.Text & "','" & DateTimePicker1. Text & "')", Mycon, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)
MsgBox("save agad")
End Sub

when i run it an error shows like this:

System.Runtime.InteropServices.COMException was unhandled
ErrorCode=-2147217887
Message="ODBC driver does not support the requested properties."
Source="Microsoft OLE DB Provider for ODBC Drivers"

i don't know how to solve this because i used this code already in other project and it worked..

is anyone know how to solve this??

help. . . . :cry:

Viewing all articles
Browse latest Browse all 27189

Trending Articles



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