and I'm spent

Results 1 to 2 of 2

Thread: and I'm spent

  1. #1
    Troy Guest

    Default and I'm spent

    What would it mean when I can change the table and locationName variable and the code will work, but I can&#039;t use this table shown. Each time I try I my program fails. Any suggestions?<BR><BR>SET rs = cn.Execute( _<BR> "SELECT LocationName FROM Location WHERE CompanyID = " &_<BR> CSTR( Session("CompanyID") ) )<BR>

  2. #2
    Join Date
    Dec 1969

    Default But *HOW* does it fail?

    You sure don&#039;t give us anything at all to go on!<BR><BR>Wild *** guess: If you use a different table name (that is, something other than "Location"), then maybe *that* table doesn&#039;t even *HAVE* a "LocationName" field and/or a "CompanyID" field!<BR><BR>You *really* ought to rewrite that code thus:<BR><BR>SQL = "SELECT LocationName FROM Location WHERE CompanyID = " &_<BR>CSTR( Session("CompanyID") ) )<BR><BR>&#039; for debugging purposes...comment out next line when all works!<BR>Response.Write "&#060;HR&#062;" & SQL & "&#060;HR&#062;" & vbNewLine<BR><BR>SET rs = cn.Execute( SQL )<BR><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