R
|
Roger 3/29/2009 |
Do you see what's wrong with this? I am trying to show the [Project Name] from the [Project Details] table (which is not the current table) where the [Project Details].[Project Login] = the currently logged in user. I am getting an ASP Error related to the SQL. Any help appreciated. str = "Select [Project Name] from [PROJECT DETAILS] WHERE [PROJECT DETAILS].[Project Login] = '" & Session("UserID") & "'" Set rstmp = server.CreateObject("ADODB.Recordset") rstmp.open str,dbConnection 'Response.Write Session(str) Response.Write rstmp(Session("Project Name")) rstmp.close set rstmp=nothing
|
B
|
bhicks11 author 3/30/2009 |
Just a basic question here. What is this supposed to do: Response.Write rstmp(Session("Project Name")) ??? I think what you want is Response.Write rstmp("Project Name"). This would be the collection element of the record set, RSTMP. rstmp(Session("Project Name")) would cause an issue, because there is no such critter as SESSION("Proejct Name") in the collection. Just my guess. Roger
|
B
|
bhicks11 author 3/30/2009 |
Just a basic question here. What is this supposed to do: Response.Write rstmp(Session("Project Name")) ??? I think what you want is Response.Write rstmp("Project Name"). This would be the collection element of the record set, RSTMP. rstmp(Session("Project Name")) would cause an issue, because there is no such critter as SESSION("Proejct Name") in the collection. Just my guess. Roger
|
R
|
Roger 3/30/2009 |
SQL query SELECT ID, Name, Responsibility, [GSWCC#], Address, City, [State], zip, [Contact Phone Number], [Contact Email], Project, Notes FROM [TEAM MEMBERS - LOG BOOK COVER PAGE] where Project='locustgrovekh'
|
A
|
andie.caron 3/30/2009 |
ALSO, this [TEAM MEMBERS - LOG BOOK COVER PAGE] would look like a Calculation to SQL Query Analyzer... Roger
|
B
|
bhicks11 author 3/30/2009 |
SQL query SELECT ID, Name, Responsibility, [GSWCC#], Address, City, [State], zip, [Contact Phone Number], [Contact Email], Project, Notes FROM [TEAM MEMBERS - LOG BOOK COVER PAGE] where Project='locustgrovekh' Solution This error means one of the following:
|
R
|
Roger 3/30/2009 |
Sorry bhicks, my bad. I assumed SQL not Access. In any case, the same holds true. |
B
|
bhicks11 author 3/31/2009 |
Sorry bhicks, my bad. I assumed SQL not Access. In any case, the same holds true. Also, it's not the SPACESthat are your issue, it's the MINUS SIGN. This make the SQL QUERY ANAYLZER (regardless of SQLor Access) to think you are doing a subtraction mathematical operation. That's one of the big issues here. In one of your previous posts, you suggested that you thought you had it fixed (which I assumed was the ISNULLissue). I still strongly revisiting your scheam, regardless - you are heading for all kinds of trouble. Anyway, just tryting to help.
|