SIGH - How can I trouble shoot this?

Results 1 to 2 of 2

Thread: SIGH - How can I trouble shoot this?

  1. #1
    Join Date
    Dec 1969

    Default SIGH - How can I trouble shoot this?

    I&#039;ve changed this code a dozen times and I just can&#039;t seem to get it right. All it keeps telling me is "Type Mismatch" but that doesn&#039;t give me enough info to know where to start. I know ASP very well but have not messed with Inner Joins much.<BR><BR> sqlUSER1 = "SELECT Favorites.ClientID, Favorites.JobID, Favorites.TableName, RecJobs.DateAdded, RecJobs.ID, RecJobs.JobType, RecJobs.City, RecJobs.State, RecJobs.Active " & _<BR> "FROM Favorites INNER JOIN RecJobs ON Favorites.ClientID = RecJobs.PollID " & _<BR> "Where Favorites.TableName = &#039;"&rec&"&#039; "<BR> Set RSUSER1 = Server.CreateObject("ADODB.Recordset")<BR> RSUSER1.Open sqlUSER1, Con<BR> If Not RSUSER1.EOF Then<BR> While Not RSUSER1.EOF

  2. #2
    Join Date
    Dec 1969

    Default RE: SIGH - How can I trouble shoot this?

    The only thing I can see is this. Are "Favorites.ClientID" and "RecJobs.PollID" the same type.<BR><BR>Apart from this all I can suggest is to put the line<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response .Write sqlUSER1 <BR><BR>Before the error which I assume is occurring at the statement:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RSUSER 1.Open sqlUSER1, Con<BR><BR>When you display the result of the "Response.Write" you should copy and paste the text into your DBMS, and analyse it there. This is easy if you are using MS Access. You just create a new blank Query, and in SQL mode replace the sql with this statement, and execute it. <BR><BR>If this is no good, start from scratch in MS Access with the tables you are trying to access above and create the query using MS Access&#039; query design grid.<BR><BR>If your db is not Access, then there should be a similar facility in your DBMS. Generate the query and paste the SQL back into your code. This method may seem a little lazy, but is guarranteed to give you a query that satisfies your need.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts