• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

programming in VB - need help

acejj26

Senior member
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.
 
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.(&quot;ADODB.Connection&quot😉

AdoConn.Open &quot;DSN=myAccessDSN&quot; 'Assuming you have the access db set up as a DSN, which i recomend

Set rsRecordset = CreateObject&quot;(ADODB.RecordSet&quot😉

rsRecordset.Open &quot;Select * From myTable sort By Field1&quot;, AdoConn 'this is where your SQL goes.
>>

then use the recordset accordingly....
 
Back
Top