A acejj26 Senior member Dec 15, 1999 886 0 0 Dec 26, 2000 #1 Does anyone know how to execute a SQL statement, in Visual Basic, with the sole purpose of ordering data in a database? If so, please let me know.
Does anyone know how to execute a SQL statement, in Visual Basic, with the sole purpose of ordering data in a database? If so, please let me know.
T Train Lifer Jun 22, 2000 13,577 72 91 www.bing.com Dec 26, 2000 #2 what databse are you hookng up to? im assuming an access database? well, heres howd id do it in script: << DIM AdoConn DIM rsRecordset Set AdoConn = CreateObject.("ADODB.Connection" AdoConn.Open "DSN=myAccessDSN" 'Assuming you have the access db set up as a DSN, which i recomend Set rsRecordset = CreateObject"(ADODB.RecordSet" rsRecordset.Open "Select * From myTable sort By Field1", AdoConn 'this is where your SQL goes. >> then use the recordset accordingly....
what databse are you hookng up to? im assuming an access database? well, heres howd id do it in script: << DIM AdoConn DIM rsRecordset Set AdoConn = CreateObject.("ADODB.Connection" AdoConn.Open "DSN=myAccessDSN" 'Assuming you have the access db set up as a DSN, which i recomend Set rsRecordset = CreateObject"(ADODB.RecordSet" rsRecordset.Open "Select * From myTable sort By Field1", AdoConn 'this is where your SQL goes. >> then use the recordset accordingly....