Weiss jemand von euch, wie man obenstehendes Problem loesen kann? Ich hab jetzt schon einige Zeit hier im Forum gestoebert, hab aber nichts wirklich Brauchbares finden koennen. Ich hab biesher folgenden Sourcecode, krieg aber immer eine Fehlermeldung, weil er Text1.Text, etc. nicht als gueltigen Wert anerkennt.
Wenn wer was weiss, bitte ich um Hilfe. Bis dahin
Code:
Private Sub Form_Initialize()
'Iniciamos el proceso de coneccion
Set Conn = New ADODB.Connection
Conn.CursorLocation = adUseClient
Conn.ConnectionString = "DRIVER=MySQL ODBC 3.51 Driver;" _
& "SERVER=10.0.5.31;" _
& "DATABASE=probe;" _
& "UID=root;" _
& "PWD= "
'Abrimos la conexion
Conn.Open
'Preparamos el recordset
Set rs = New ADODB.Recordset
'preparamos los text box para recibir los datos
Set Text1.DataSource = rs
Set Text2.DataSource = rs
Set Text3.DataSource = rs
'-----------------------------------------------
'Asignamos los campos para cada textbox
'-----------------------------------------------
Text1.DataField = "reg_num"
Text2.DataField = "lib_tit"
Text3.DataField = "lib_aut"
'-----------------------------------------------
'x = MsgBox("La conexion fue exitosa", vbOKOnly, "sistema de libros")
End Sub
Private Sub Insertar_Click()
Conn.Execute "Insert into buch (reg_num, lib_tit, lib_aut) values (Text1.Text, Text2.Text, Text3.Text)"
End Sub
Wenn wer was weiss, bitte ich um Hilfe. Bis dahin