Article ID: 117537
Article Last Modified on 11/6/2000
Sub CreateSPTQuery()
Dim db As Database, q As QueryDef
Set db = dbengine(0)(0)
'Create a new QueryDef.
Set q = db.CreateQueryDef()
q.Name = "MySPTQuery"
'Modify the line below to select from an existing ODBC table.
q.SQL = "Select * From authors;"
q.ODBCTimeout = 60
q.Connect = "ODBC;"
q.ReturnsRecords = True
'Add the QueryDef to the QueryDefs collection.
db.QueryDefs.Append q
db.QueryDefs.Refresh
'Print the ODBCTimeout setting to the Immediate window.
Debug.Print db.QueryDefs("MySPTQuery").ODBCTimeout
End Sub
Additional query words: spt passthrough jet25 jet 2.5
Keywords: kbbug kbusage KB117537