Please help with cmd.execute select SQL?
From: What-a-Tool (Die!FrigginSpammers!DieDie!_at_IHateSpam.Com)
Date: 03/23/05
- Next message: Mustafa: "ASP to Excell"
- Previous message: Stefan Berglund: "Re: SSL/Response Object/data to client"
- Next in thread: Aaron [SQL Server MVP]: "Re: Please help with cmd.execute select SQL?"
- Reply: Aaron [SQL Server MVP]: "Re: Please help with cmd.execute select SQL?"
- Reply: Ken Schaefer: "Re: Please help with cmd.execute select SQL?"
- Reply: Bob Barrows [MVP]: "Re: Please help with cmd.execute select SQL?"
- Reply: What-a-Tool: "Re: Please help with cmd.execute select SQL?"
- Reply: What-a-Tool: "Re: Please help with cmd.execute select SQL?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 22 Mar 2005 21:06:51 -0500
What is the proper format for my SQL str using command.execute? Even though
I know I have matching data in my table, I keep coming up with a
.RecordCount of -1. What am I doing wrong?
Thanks in advance :
'Create a connection object
Set con = Server.CreateObject("ADODB.Connection")
Set rst = Server.CreateObject("ADODB.Recordset")
Set cmd = Server.CreateObject("ADODB.Command")
strSQL = "SELECT tblUI.IPAdd FROM tblUI WHERE (tblUI.IPAdd ='?')"
arSPrm = Array(strRemHst)
con.Provider = "Microsoft.Jet.OLEDB.4.0"
con.Open Server.MapPath("../dbs/vstr.mdb")
cmd.CommandType = 1
cmd.CommandText = strSQL
Set cmd.ActiveConnection = con
Set rst = cmd.Execute(,arSPrm)
- Next message: Mustafa: "ASP to Excell"
- Previous message: Stefan Berglund: "Re: SSL/Response Object/data to client"
- Next in thread: Aaron [SQL Server MVP]: "Re: Please help with cmd.execute select SQL?"
- Reply: Aaron [SQL Server MVP]: "Re: Please help with cmd.execute select SQL?"
- Reply: Ken Schaefer: "Re: Please help with cmd.execute select SQL?"
- Reply: Bob Barrows [MVP]: "Re: Please help with cmd.execute select SQL?"
- Reply: What-a-Tool: "Re: Please help with cmd.execute select SQL?"
- Reply: What-a-Tool: "Re: Please help with cmd.execute select SQL?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|