Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Invalid column name error -- please help!

Author  Topic 

marcelle42
Starting Member

2 Posts

Posted - 2005-04-04 : 14:18:30
I am receiving this error in a .asp file I wrote (using VBScript). I also receive it when I copy the query into SQL Server directly:

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

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'False'.

followed by the file and the line number that opens the query. The query is:

UPDATE mailinglist SET m4r = False, ngb = False, afghan = False, press = False, news = False, orgs = False, store = False, jobs = False, ms = False, policing = False, alerts = False, campus = False, campusalert = False, campusalumni = False, faculty = False, resumes = False, FM_donor = False, MS_member = False, FMF_donor = False, FMF_DirectMail = True, FM_DirectMail = False, MS_Donor = False, FM_member = 0, SaveRoe_donor = False, back2school = False, afghan_donor = False, dcvolunteer = False, lavolunteer = False, promotions = False, samar = False, staff = False, globalAlerts = False, titleIX = False, ec_petition = False, cairopetition = False, msevents = False, mscruiseattendee = False, msadvisoryboard = False, edu = False, globalconference = False, march = False, meetup = False, marchmall = False, donors = False, unaffiliated = False, busreg = False, busemail = False, FMFMarch = False, fc_user = False WHERE ID = 244548

None of the column names are incorrectly set to "False", as far as I can tell. Any suggestions?

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-04-04 : 14:34:25
change all falses to 0 if it's a bit column.
put 'false' around the falses if it's varchar.

Go with the flow & have fun! Else fight the flow
Go to Top of Page

rfrancisco
Yak Posting Veteran

95 Posts

Posted - 2005-04-04 : 14:36:39
SQL server does not have a boolean datatype. Its equivalent will be the bit type which only accepts 1 and 0. Verify the datatype of the fields in the table you are using and see if it is of bit datatype.

When querying bit data types from SQL server to ASP, the bits are changed to true and false but internally it is 1 and 0. So, I guess you have to change your True to 1 and False to 0.
Go to Top of Page

marcelle42
Starting Member

2 Posts

Posted - 2005-04-04 : 14:44:04
Grrr... VBScript was automatically changing them from 1 and 0 to True and False. I went back and changed them to 1 and 0 as ints in VBScript, and the error went away. Now I have new and different errors to debug. Thanks!
Go to Top of Page
   

- Advertisement -