• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3716
  • Last Modified:

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
0
slightstk
Asked:
slightstk
  • 5
  • 4
  • 2
  • +2
2 Solutions
 
Rey Obrero (Capricorn1)Commented:
SELECT col1, col2, IIF([col3] = 's', 'sold', 'not sold') AS AliasColumnName FROM TableName

or

SELECT col1, col2, IIF([col3] = "s", "sold", "not sold") AS AliasColumnName FROM TableName
0
 
slightstkAuthor Commented:
Experts please try your solutions before you post them.  I have already tried that.
0
 
jpaulinoCommented:
You have the error message and then you press ok. The VS add some spaces and then it runs fine, right ?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Rey Obrero (Capricorn1)Commented:
oh, sorry i didn't notice you are using VS..
0
 
jmoss111Commented:
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
0
 
GRayLCommented:
So make sure col3 is text?
0
 
slightstkAuthor Commented:
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?
0
 
jpaulinoCommented:
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.
0
 
slightstkAuthor Commented:
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?
0
 
jpaulinoCommented:
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.
0
 
slightstkAuthor Commented:
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.
0
 
jpaulinoCommented:
Ok, seems that you have changed the query on the dataset.
Then in the DataGridView select the "DataGridView Task" (from the top right corner) and choose add colums. Add the column AliasColumnName
0
 
slightstkAuthor Commented:
That did it jpaulino. Thanks guys.  
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 5
  • 4
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now