1 Replies - 363 Views - Last Post: 19 October 2013 - 04:18 PM Rate Topic: -----

#1 code08  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 19-October 13

making a SELECT query with parameter

Posted 19 October 2013 - 04:13 PM

Dim query As String = "user1"
Dim sqlQuery2 As String = "SELECT * FROM '" & query & "'"

ihave all the connection

can this be happen if i make a parameter name an out it in the SELECT
if not show me how to..
Is This A Good Question/Topic? 0
  • +

Replies To: making a SELECT query with parameter

#2 andrewsw  Icon User is offline

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3352
  • View blog
  • Posts: 11,345
  • Joined: 12-December 12

Re: making a SELECT query with parameter

Posted 19 October 2013 - 04:18 PM

You will need to explain your question more clearly.

In the meantime, the syntax is:

SELECT * FROM table_name

and the table-name should not be enclosed in apostrophes.

I guess you intend to do something like:

"SELECT * FROM table_name WHERE field_name = '" & query & "'"

This post has been edited by andrewsw: 19 October 2013 - 04:20 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1