Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2007

    Unanswered: ODBC Problem with Progress using VS2005

    Hi All,

    I have recently started a new job and trying to get to grips with Visual Studio 2005, I have successfully created a database link to MSSQL server running locally on my machine using the DataSet functionality within VS2005. I have now run into problems however when trying to set up a query to connect to a Progress database using the same method.

    I can successfully create the connection and pull out records, however when I create a dynamic query such as (SELECT "column1" FROM "table1" WHERE "column1" = '@variable') I run into problems.

    With the nature of the Progress ODBC connection we need to include the quotes around each column and variable, however the input variable "@variable1" is not recognised and forces ASP.NET and VS to throw an error.

    Does anybody out there have any suggestions? Please bare with me as I have only been using VS2005 for about 3 days now.

    Many thanks for your time.


  2. #2
    Join Date
    Sep 2007
    Double-quotes need to be escaped in SQL queries, and since Progress fields can have silly names that require those lovely quotes you need to do something like this (if you're just building a query as a string that is):

    string theQuery = "SELECT \"" + columnName + "\" FROM pub.\"" + tableName + "\" WHERE \"" + columnName + "\" = \"" + variable = "\"";
    Personally, I'm very happy every day that I take one more step further away from working with Progress.

    I hope that helps.

Posting Permissions

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