![]() |
GridView Troubles
Hi, I’m having trouble with my grid view. When the user is signed into my site and clicks button1, the users name is turned into a string and used in a query to display all the information for that user, but unfortunately it doesn’t work. It should output all the CD’s the user has input into the database. Here’s the code I have…
Code:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.ClickThanks, CaJack P.S. English isn’t my first language and I’m sorry if I haven’t explained my problem fully, if I haven’t explained it fully just let me know and I’ll try and explain it better. Thanks for reading. |
Re: GridView Troubles
I guess there's a problem with your SQL query, now your query looks like this
Code: SQL
Where as it should look like this, Code: SQL
Solution: Code:
DBAdap = New SqlDataAdapter("SELECT * FROM Table1 WHERE UserName = '" & myString &"'", DBConn) |
Re: GridView Troubles
Thank you so much, thats fixed it and it's working fine now.
|
| All times are GMT +5.5. The time now is 20:10. |