santiagope2000
Jun 27th, 2000, 08:37 AM
I've finally figured out how to establish a connection to my SQL server using ADO 2.1 and ODBC 3.6. Heck I can even create a DSN at run time and qry on the fly however I still can't SEE the data I'm querying for. Is there a snippet out there that demonstrates how I can view the output file via text box, debug or better yet a DataGrid or FlexGrid?
()()() SAMPLE CODE BELOW ()()()
Dim dyn As Recordset
Dim db As Database
Private Sub cmdConnectCode_Click()
'Set up the ODBC connection to my database
Set db = OpenDatabase("Example", dbDriverNoPrompt, False, "ODBC;DSN=Experimental;UID=sa;PWD=;Database=MyFirstDatabase;SRVR=SQLDEVSRV001;")
'Define and run my SQL Statement
Set dyn = db.OpenRecordset("Select * from mypeople")
'the mysterious output'
End Sub
Private Sub Form_Load()
'CreateSQLServerDSN "MyDSN", "MyServer", "MyDatabase"
'CreateSQLServerDSN "Experimental", "SQLDEVSRV001", "MyFirstDatabase"
'calling param too long to paste here'
End Sub
-DB Grasshopper
()()() SAMPLE CODE BELOW ()()()
Dim dyn As Recordset
Dim db As Database
Private Sub cmdConnectCode_Click()
'Set up the ODBC connection to my database
Set db = OpenDatabase("Example", dbDriverNoPrompt, False, "ODBC;DSN=Experimental;UID=sa;PWD=;Database=MyFirstDatabase;SRVR=SQLDEVSRV001;")
'Define and run my SQL Statement
Set dyn = db.OpenRecordset("Select * from mypeople")
'the mysterious output'
End Sub
Private Sub Form_Load()
'CreateSQLServerDSN "MyDSN", "MyServer", "MyDatabase"
'CreateSQLServerDSN "Experimental", "SQLDEVSRV001", "MyFirstDatabase"
'calling param too long to paste here'
End Sub
-DB Grasshopper