Originally posted by glassonline78
Hi all, i have a little problem. I would like to insert an sql command (like a select for example) in the code of a vb6 program just to make the result set visible in a text box, for example. After I declare a variable as string in which I put my sql-command-string, what have I to do to execute it?
tnx for your help.
i assume u have one text box and one command button on ur form. make sure u have an odbc connection which is ur dsn. the databse i am using here is oracle with front end vb
in the general declarations:
dim db as database
dim rs as recordset
in the form load:
Set db = OpenDatabase("aaa", False, false, "odbc;uid=scott;pwd=tiger;dsn=aaa")
Set rs = db.OpenRecordset("select * from customers")
on the command click: