ChrisBurch
IS-IT--Management
I have just managed to be able to connect to my Progress database, and return data to VB6, by hardcoding the 'WHERE' part of the query into the select statement. Can someone give some guidance as to how set this up so that it is a variable. ie. so I can pull it from a textbox. In my code below, I need to replace 'Desp' with a variable.
Sub Update()
Dim rs As Recordset
Set rs = CreateObject("ADODB.Recordset"
rs.Open "select * from wc where wc = 'Desp'", "dsn=syteline4;uid=;pwd=;"
Text1.Text = rs![wc]
Text2.Text = rs![Description]
Text3.Text = rs![Calendar]
Text4.Text = rs![charfld1]
rs.Close
Set rs.ActiveConnection = Nothing
Set rs = Nothing
End Sub
Thanks for any assistance,
Chris
It worked yesterday.
It doesn't work today.
That's Windows!
Sub Update()
Dim rs As Recordset
Set rs = CreateObject("ADODB.Recordset"
rs.Open "select * from wc where wc = 'Desp'", "dsn=syteline4;uid=;pwd=;"
Text1.Text = rs![wc]
Text2.Text = rs![Description]
Text3.Text = rs![Calendar]
Text4.Text = rs![charfld1]
rs.Close
Set rs.ActiveConnection = Nothing
Set rs = Nothing
End Sub
Thanks for any assistance,
Chris
It worked yesterday.
It doesn't work today.
That's Windows!