Right guys - Ages ago I wrote a few programs which accessed a database (then, MS Access 2 files, but can be any ODBC source) in VB4. However, I can't find my old source code, and I can't get my head round Microsoft's help files for VB6 for simple data access.
I can use .ASP files to access ODBC sources no problem, but I seem to have now got a mental block.
So, could anyone help me here and give me a bit of code for either VB6 or even VB4 which will let me do simple data access?
(in asp vbscript, I can do it in a few lines, as follows:
(That's reading data, and it's not too hard to write it too)
So, can someone give me a snippet of code which will help me before my head explodes?
------------------
Cheers,
Steve
"Life is what we make of it, yet most of us just fake"
I can use .ASP files to access ODBC sources no problem, but I seem to have now got a mental block.
So, could anyone help me here and give me a bit of code for either VB6 or even VB4 which will let me do simple data access?
(in asp vbscript, I can do it in a few lines, as follows:
Code:
Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "dsn=DNSNAME;uid=sa;pwd=" SQLQuery = " select * from BLAH where BLAH = BLAH order by BLAH desc" Set RS = Conn.Execute(SQLQuery) Do While Not RS.EOF data = RS("FIELDNAME") RS.MoveNext Loop
So, can someone give me a snippet of code which will help me before my head explodes?
------------------
Cheers,
Steve
"Life is what we make of it, yet most of us just fake"
Comment