Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question mark in the name of the field

Status
Not open for further replies.

VladimirKim

Programmer
Jan 20, 2005
49
US
Hi,
my sql string is this:

sql=" SELECT HDetails.HotelNum, Hotels_2k.HotelName, HDetails.ArrivalDate, HDetails.Nights, Hotel_Room_2k.AllotmentKey, Res.ResID " & _
" FROM Hotel_Room_2k INNER JOIN (Hotels_2k INNER JOIN (Res INNER JOIN HDetails ON Res.ResNum = HDetails.ResNum) ON
Hotels_2k.idhotel = HDetails.HotelNum) ON Hotel_Room_2k.idRoom = HDetails.RoomID " & _
" WHERE (HDetails.ArrivalDate >= #11/25/2004# AND HDetails.ArrivalDate <= #12/23/2004# AND (Res.ResID > 1000 AND Res.ResID < 25000 AND res.""Quote?"" = NO)AND HDetails.Cancel = No AND HDetails.AboveAllotment = No AND res.Group = No AND Hotel_Room_2k.AllotmentKey = 10035); "

This string is being used in ASP page to pull the recordset from Access 97 Database.
Everthing is ok and it even works on NT 4.0 Server, but when asp page is moved to Windows 2003 server, it's giving an error. I figured the problem is in this piece:
res.""Quote?"" = NO
Without it, it runs fine.
The name of the field contains a question mark, it is:
Quote?
It will be very difficult to change the name of this field. So is there a way to workaround this problem w/out changing the name of the field?
In Access itself the field is being reffered as res.[Quote?], but apparently that does not work in ASP.
Thanks in advance,
Vladimir
 
Yes, I tried that and in both cases it gives me an error message:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
 
try res.[Quote?]=NO as Tony suggested....

Do a response.write sql

and copy paste that in your Access Database and run it...

-L
 
Access is not accepting res.Quote?=NO
It requires res.[Quote?]=NO, but that does not run in ASP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top