.NET Programming

  • I just unwrapped a brand-new VS.NET 2003.  I'm trying to get a simple form to read the data from my SQL 2K installation, but one of my parameterized queries is giving me an error when I attempt to save it:

    ADO error: Line 1: Incorrect syntax near 'COLLATE'.

    I know why I'm getting this error.  The database is running in 6.5 comaptibility mode because of a third-party application, and I cannot update it to use real 2K mode.

    Does anyone know of a way to tell .NET that the DB is using that mode, or of telling it not to specify the collation?  Or, any other work-around?

    So long, and thanks for all the fish,

    Russell Shilling, MCDBA, MCSA 2K3, MCSE 2K3

  • If you are using sqlData Provider I have news for you: Is meant to work with SQL SERVER 2000! when you set the compatiblility level on the server to 6.5 the TDS will behave as 6.5 server in the eyes of the client.

    You may want to use the oledb provider and use ODBC to connect instead. I haven't actually tested this but this seems to me like the workaround

    hth

       


    * Noel

  • I've asked the software vendor to run in 2K mode, because then I could use later features such as "TOP 10" and user functions, but they say it breaks pieces of their app.

    I'll try the ODBC data connector.  Thanks.

    So long, and thanks for all the fish,

    Russell Shilling, MCDBA, MCSA 2K3, MCSE 2K3

  • I've got a similar situation here, except that the database I have to hit on is not in compatibility mode, it *is* SQL Server 6.5. ODBC works OK against it though, although it does seem to be a bit slower (not that much though). Other than using the ODBC objects, it's pretty much the same code, but make sure you use ODBC call syntax if you're accessing stored procs!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply