Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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..
Posted

From the other questions you've posted, you REALLY need to learn SQL before continuing. Your SQL doesn't make any sense at all.

Sql Tutorials[^]
 
Share this answer
 
i know Sql but ive asking a question if it can be happen?
 
Share this answer
 
Comments
André Kraak 19-Oct-13 19:38pm    
I think you intended to comment to a solution, but created a solution instead.

If you have a question about or comment on a given solution use the "Have a Question or Comment?" option beneath the solution. When using this option the person who gave the solution gets an e-mail message and knows you placed a comment and can respond if he/she wants.
Please move the content of this solution to the solution you are commenting on and remove the solution.

Thank you.
SQL
--Your format is odd, 
SELECT * FROM 'user1' --will not return anything.
--Your select statement should point to a table, not a string
SELECT * FROM [TableName]  --will return all entries of the specified table
--if you have A column inside of that table called username, and you want all rows where the username is user1 then you should format your command as fallows.
SELECT * FROM [TableName] WHERE username = 'user1'
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900