Results 1 to 5 of 5

Thread: ADO Command SQL Statement w/ variable *Resolved*

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2003
    Location
    USA
    Posts
    102

    Question ADO Command SQL Statement w/ variable *Resolved*

    Sry if the title of the thread sucks but I am creating a command incode for my program and I am not sure if I wrote it quite right as i am not sure of how to add a variable to a SQL statement in VB so here is the code can you tell me if it is done right please.

    Thx in advance

    VB Code:
    1. With m_adoCommandAR
    2.         .CommandText = "SELECT Square_Name0, Square_Name1, Square_Name2, " & _
    3.                         "Square_Name3, Square_Name4, Square_Name5, " & _
    4.                         "Square_Name6, Square_Name7, Square_Name8, " & _
    5.                         "Square_Name9, FROM Areas WHERE Area_Name = " & _
    6.                         RoomName 'The variable
    7.        .CommandType = adCmdText
    8.        .ActiveConnection = m_adoConnection
    9.     End With
    Last edited by Tek; Oct 15th, 2003 at 05:44 AM.
    ===============
    Tek
    ===============

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