Jump to content
  • 0

SQL Server error:Invalid column name


beaverq

Question

Can anyone explain this: when I do a "SelectRawData" call to Caspio DB with the web service I get strange results depending on what I do with the "Criteria" field.

--if I use field "Customer", which is an autonumber field, the query runs fine.

--if I use any other field (eg, "LastName = Jones"), I get this strange error message:

Fault faultcode: soap:Client, faultstring {SQL Server error: Invalid column name 'Boo'.}

Why would the ws try to treat the field content (Jones) as a column name (LastName)? (Trying to put single quotes around 'Jones' doesn't seem to help.)

The WebService API documentation says that the SelectRawData call Criteria field is an SQL 'where' query without the 'where'. As far as I know, this is a valid SQL query:

Select age from tblStuff where LastName = "Jones"
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

You know, all the time I wasted trying to figure out the undocumented features of this product, I could have build my own LAMP project 3 times over.

Just by chance I discovered the answer to my query. I was trying to enter an email address with an UpdateData query and got this error message:

Fault: faultcode: soap:Client, faultstring: {SQL Server error: The multi-part identifier "generic2@somemail.com" could not be bound.}

"multipart' immediately suggests a possible need for quotation marks, so I experimented with entering the ValueList item as "'generic@somemail.com'" and lo-and-behold, it worked. Weird. A string within a string?

Anyway on another hunch I tried putting one word into the ValueList field:

bread

and I got the same error message that this thread started with (the strange message about "Invalid Column Name"). And putting the double set of quotes (" 'bread' ") removed that error message and let the UpdateQuery work.

I'm beginning to believe that this ridiculously incomplete "API" for the WS is just put out there to trap people into needing their $250/hour coding services.

:x

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...