syntax question

Results 1 to 4 of 4

Thread: syntax question

  1. #1
    the other steve Guest

    Default syntax question

    OK<BR><BR>When I use my stored procedure via:<BR><BR>query = "sp_test1 @ok=false"<BR>set rs=conn.execute(query)<BR><BR>I get this:<BR><BR>[Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type nvarchar to bit. <BR><BR>So how do I write to a bit field in SQL? ok is bit type field in the SQL database.<BR><BR>And, so I stop bothering the board, is there a list of ADO/SQL syntax in a FAQ somewhere?

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default I guess

    your datatype is BIT<BR><BR><BR>that can only be a 0 or a 1 or Null and NOTHING else<BR><BR>you have to convert the false or true to a 0 or a 1 and THEN call the sp.<BR><BR>

  3. #3
    the other steve Guest

    Default dammit it worked

    It worked, but I thought I had already tried that!<BR><BR>query = "sp_test1 @ok=0"<BR>set rs=conn.execute(query)

  4. #4
    Join Date
    Dec 1969

    Default TSQL syntax...

    You know, ADO has *NOTHING* to do with SQL syntax. <BR><BR>*YOU* create a string that is hopefully valid SQL and all ADO does is pass it along, unaltered, to what ever database you happen to be connected to. ADO has ZERO idea that the different databases have different SQL syntax requirements, for example.<BR><BR>So the only place to look a SQL Server guide, of course.<BR><BR>So, perhaps: <BR><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