problems with "bit"-datatype (SQL server 7)

Results 1 to 5 of 5

Thread: problems with "bit"-datatype (SQL server 7)

  1. #1
    martin Guest

    Default problems with "bit"-datatype (SQL server 7)

    I&#039ve created a table using Access 97 width a yes/no-column.<BR>I wanted to import the data to a SQL server 7 and used the build-in import-tools in SQL Server. After the import, the yes/no-column turned into a "bit"-datatype with values 1 or 0 (true, false)<BR>The problem is when I want to use the info from the table in an ASP-page, I get an error when accessing the bit-column:<BR>---<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80020009&#039 <BR><BR>Errors occurred <BR><BR>? <BR>---<BR><BR>Everything works fine when accessing all the other<BR>columne but failes on bit-column.<BR><BR>I&#039ve tried everything.<BR>What am I doing wrong?<BR><BR>/martin

  2. #2
    Nathen Grass Guest

    Default RE: problems with

    Do you have any columns with the text datatype?

  3. #3
    martin Guest

    Default RE: problems with

    yes, have 4 nvarchar(250) columns, 1 ntext(16) and 1 bit(1) column...<BR>

  4. #4
    Nathen Grass Guest

    Default RE: problems with

    I&#039m going to take a wild guess but you probably have your ntext column in your SELECT statement before your bit column. If this is the case you need to make your ntext column the last item in your select statement and when you spit the values out to your ASP page be sure to get the ntext value last. <BR><BR>I had the same problem you&#039re having and the text column was the culprit. It seems that whenever you try to get a value from a recordset after you have already extracted a value from a text column the &#039Errors Occurred&#039 error appears. Not a very intuitive error message if you ask me.


  5. #5
    martin Guest

    Default RE: problems with

    well actually the SQL-statement selects * from the table because the sql-statement is created based on querystring aso, ans is used to get data from many different tables.<BR>If i have to use the select col1, col2, col3, col4... i must use a long select case

Posting Permissions

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