If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Problem with SQL string using MS Access and OleDbConnection (ASP .NET)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-28-04, 11:21
grier_allen grier_allen is offline
Registered User
 
Join Date: Jan 2004
Posts: 1
Problem with SQL string using MS Access and OleDbConnection (ASP .NET)

The string concatination below works in the Query builder built-in to MS Access, but when I try it as an OleDbCommand it doesn't work.



SELECT ID, LastName + ', ' + FirstName AS Names FROM AgentNames;




Is there any other ways to return a combination like this using an OleDbCommand?

Thanks,

Grier
Reply With Quote
  #2 (permalink)  
Old 01-28-04, 16:17
ss659 ss659 is offline
Registered User
 
Join Date: Jan 2004
Posts: 492
Re: Problem with SQL string using MS Access and OleDbConnection (ASP .NET)

Quote:
Originally posted by grier_allen
The string concatination below works in the Query builder built-in to MS Access, but when I try it as an OleDbCommand it doesn't work.



SELECT ID, LastName + ', ' + FirstName AS Names FROM AgentNames;




Is there any other ways to return a combination like this using an OleDbCommand?

Thanks,

Grier

Shot in the dark here but try [LastName + ',' + FirstName] as Names. If not, I dont know why that won't work.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On