CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2000
    Posts
    200

    ADO - using data environment

    Where can I read about entering an SQL statement as one on my commands (Connection1) such as SELECT * FROM Customers WHERE CUSTID = ? and the CUSTID would be supplied by the user at run time. Thanks for any input!

    John


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: ADO - using data environment

    At the run time when user entered his name, assign it to a variable string (sName) and then call the SQL
    sSQL = "SELECT * FROM Customers WHERE CUSTID = '" & sName & "'"

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Sep 2000
    Posts
    200

    Re: ADO - using data environment

    That will work, but I thought there was a way to enter your SQL statement as a Command & somehow reference the variable to the unknown in the SQL statement which is designated by a ?


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured