SQL problems

Results 1 to 2 of 2

Thread: SQL problems

  1. #1
    just me Guest

    Default SQL problems

    I&#039m having difficulty with a SQL Query - it refuses to bring anything out of the database, although it does work fine in the SQL Query Analyzer. The connection string, which is in an include file, is below:<BR><BR>Set MSCS = Server.CreateObject("ADODB.Connection")<BR>MSCS.Op en MSCSSite.DefaultConnectionString<BR>Set cmdTemp = Server.CreateObject("ADODB.Command")<BR>cmdTemp.Co mmandType = adCmdText<BR>Set cmdTemp.ActiveConnection = MSCS<BR><BR>and the SQL statement is:<BR><BR>cmdTemp.CommandText = "SELECT dd.dept_name, tl.line, bp.CurrentOrNonCurrent, bp.sku, bp.BPName FROM table_dept dd, table_line tl, table_Product_Names pn, table_Base_Product bp WHERE bp.LineID = &#039"&line&"&#039 AND bp.LineID = tl.line_id AND bp.CurrentOrNonCurrent = &#039 1&#039 AND pn.PN_id = bp.PN_id AND dd.dept_id = pn.dept_id"<BR>set productRS = server.CreateObject("ADODB.Recordset")<BR>productR S.Open cmdTemp,,adOpenStatic,adLockReadOnly<BR><BR>Anyone have any suggestions?<BR>

  2. #2
    just me Guest

    Default Never mind - I got it


Posting Permissions

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