Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    1

    Unanswered: 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

  2. #2
    Join Date
    Jan 2004
    Posts
    492

    Re: Problem with SQL string using MS Access and OleDbConnection (ASP .NET)

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •