Peperl
04-20-2004, 03:40 AM
Hi
I have this function to a control that I have created that show a msgbox with a combo.
Before, I tried to create at run-time the dsn, and enlace with a adodc, but now I'm trying to translate that function to a ADODB, but I don't get that this works, 'cos when I see the combo I get the value in the textbox, but the list of items is empty
When I do the connection, I comprobate the GetString property and pick me all the values
AdoConn.ConnectionString = "driver={MySQL ODBC 3.51 driver};server=" & Serv & ";Port=3306;Option=131072;stmt=;database=" & BD & ";uid=" & User & ";Pwd=" & Password
AdoConexion.Open
AdoRecordset.Open StrinConnection, AdoConn, adOpenDynamic, adLockOptimistic, 1
Set CmdRes.RowSource = AdoRecordset
CmdRes.ListField = MyField
CmdRes.Refresh
CmdRes.Text = AdoRecordset.Fields(MyField).Value
does anybody what's wrong in the code?
Thanks
I have this function to a control that I have created that show a msgbox with a combo.
Before, I tried to create at run-time the dsn, and enlace with a adodc, but now I'm trying to translate that function to a ADODB, but I don't get that this works, 'cos when I see the combo I get the value in the textbox, but the list of items is empty
When I do the connection, I comprobate the GetString property and pick me all the values
AdoConn.ConnectionString = "driver={MySQL ODBC 3.51 driver};server=" & Serv & ";Port=3306;Option=131072;stmt=;database=" & BD & ";uid=" & User & ";Pwd=" & Password
AdoConexion.Open
AdoRecordset.Open StrinConnection, AdoConn, adOpenDynamic, adLockOptimistic, 1
Set CmdRes.RowSource = AdoRecordset
CmdRes.ListField = MyField
CmdRes.Refresh
CmdRes.Text = AdoRecordset.Fields(MyField).Value
does anybody what's wrong in the code?
Thanks