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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Statement Issue 1

Status
Not open for further replies.

MMund

Programmer
Oct 9, 2007
57
CA
I'm trying to get some information out of a couple of Access tables using a SQL statement, to wit:

Code:
' Retrieve all data from the Form
UUserID = Request.Form("XUserID")
UProjNo = Request.Form("XProjNo")
UProjName = Request.Form("XProjName")
UProjDesc = Request.Form("XProjDesc")
UProjCompDate = Request.Form("XProjCompDate") 
UCompApprovedBy = Request.Form("XCompApprovedBy") 
UStatusCode = Request.Form("XStatusCode") 
UProjRemarks = Request.Form("XProjRemarks")

mysql = "SELECT tblProjects.ProjectNo, tblProjects.ProjectName, tblUserValidation.strName, "
mysql = mysql & "tblUserValidation.StrEmail "
mysql = mysql & "FROM tblProjects INNER JOIN tblUserValidation ON tblProjects.Manager = tblUserValidation.UserID "
mysql = mysql & "WHERE tblProjects.ProjectNo = "& cint(UProjNo) 
'response.Write mysql
'response.End
rcset.Open mysql, objconn
The "U" variable values were all pulled from the previous page.

When I try to run this, I get the Object Required error with a '"' on the end

What am I doing wrong?
 
Try this...

Code:
'response.Write mysql
'response.End
[!]Set rcset = Server.CreateObject("ADODB.Recordset")[/!]
rcset.Open mysql, objconn

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Thanks, that got me past that problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top