Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving a query (querydef)

Status
Not open for further replies.

rickpill

Programmer
Feb 28, 2002
108
0
0
US
I'm new to ASP and looking for help - saving a query.

Thanks,

Rick
 
Sorry,I do not understand a question...

What do you mean by saving a query??? <Dmitriy>
dbrom@crosswinds.net
 
I should read &quot;creating&quot; a query - Here's what I'm working with - the error I get is Object required db.

Sub SaveQuery(strQuery)
dim db
'Set up Connection
set con=Server.CreateObject(&quot;ADODB.Connection&quot;)

'Set up Provider
db=&quot;Provider=Microsoft.Jet.OLEDB.4.0;&quot; & _
&quot;data source=.............. etc.
' Open the database
con.open db
dq = Querydef
qd = db.CreateQueryDef(&quot;qryCampaign&quot;, strQuery)
If FailOnError Then
qd.Execute (DB_FAILONERROR)
Else
qd.Execute
End If
qd.Close
Set qd = Nothing

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top