Link to home
Start Free TrialLog in
Avatar of slightstk
slightstk

asked on

Error in list of function arguments: '=' not recognized. Unable to parse query text

When configuring the following query (see below) in a table adabter I get the aformentioned error message.

SELECT col1, col2, IIF(col3 = 's', 'sold', 'not sold') AS AliasColumnName FROM TableName
NOTE: Im using MS Access and designing in VB.Net
SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of slightstk
slightstk

ASKER

Experts please try your solutions before you post them.  I have already tried that.
You have the error message and then you press ok. The VS add some spaces and then it runs fine, right ?
oh, sorry i didn't notice you are using VS..
Hi slightstk,

Do you realize that if your last comment was followed nothing would ever get answered? This site is for help not doing it for you.

Regards,

Jim
So make sure col3 is text?
Ok, fine so I click OK and ignore the err. However I can't get the column to show up on the DataGridView.  I have deleted the BindingSource and created a new one with the same query and I still cant get the AliasColumnName to appear on the  DataGridView.  How Do I get this new column to appear on the dgv?
But this has nothing to do with your question! After you press OK the query runs fine.
You have to show code, explain what you have done, etc, etc.
There is no way to determine if the code runs fine because I don't see the results in the DataGridView.  There is no code to show.  Simply put I have a GDV, bound to a table with the sql query metioned above.  The alias column never shows.  How do I get this column to appera appear on the GDV?
But you cannot make changes on the Access Database from the Visual Studio! It doesn't allow you to save.
If you're trying to do the changes there you cannot see the right result.
Im not trying to make changes to the db.  I am trying to execute the following query:

SELECT col1, col2, IIF(col3 = 's', 'sold', 'not sold') AS AliasColumnName FROM TableName

Display the results in a DataGridView.  However, the column AliasColumnName does not appear there.  How do I get it to appear on the DataGridView?

Guys I know that I bounced around on this question but I belive all these problems are connected.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That did it jpaulino. Thanks guys.