Forum Moderators: phranque

Message Too Old, No Replies

SQL Error

         

hotnewfilm

4:23 pm on Dec 24, 2003 (gmt 0)

10+ Year Member



Sorry for the Christmas Eve post but I'm kind of desperate here. Our webmaster just upsized us from Access 2000 to SQL, and before leaving us for the holidays, he didn't check all our pages. Some aren't working and this is the error I'm getting (followed by the code on the page). The only other info I can provide that may be of help is that "Current" is a check box field with a Yes/No format. Any help would be appreciated.

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '='.

/dvd/dvd_current.asp, line 12

<%
Set DVD_Current = Server.CreateObject("ADODB.Recordset")
DVD_Current.ActiveConnection = MM_SlantDB_STRING
DVD_Current.Source = "SELECT * FROM DVD WHERE Current = True Order by date desc"
DVD_Current.CursorType = 3
DVD_Current.CursorLocation = 2
DVD_Current.LockType = 1
DVD_Current.Open()
%>

bcolflesh

4:39 pm on Dec 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The "checkbox" field was probably translated during the upsize - instead of:

Current = True

you need:

Current = -1

or

Current = 1

depending on Current having the possible values of 0, 1 or 0, -1

hotnewfilm

5:08 pm on Dec 24, 2003 (gmt 0)

10+ Year Member



I noticed that the upsizing wizard translated the column and I used -1 instead of TRUE but I continue to get the same exact error message. :(

Spooky

2:43 pm on Dec 31, 2003 (gmt 0)

10+ Year Member


Whats the actual column type of that item? Im assuming its now a bit field?
Did you try "WHERE Current=1"?