0

can u help me, i need to get the data from the table, but the table will be based on the text on textbox, like the fieldname that will be based on aniTypes.text ...

AnimalRS.Open ("select * from & AniKindtxt.text & where AniTypes='" & AniTypestxt.Text & "'"), Animals

this is not working .. help me please

example
when AniKind.text = "Mammals"
it will look for the table name that named Mammals in the database

2
Contributors
1
Reply
13
Views
3 Years
Discussion Span
Last Post by rishif2
0

it seems that you're trying to build sql query on the basis of textbox values
try following:-

"select * from " & AniKindtxt.Text & " where AniTypes='" & AniTypestxt.Text & "'"

one more thing about what you write in you thread:-
AnimalRS.Open ("select * from & AniKindtxt.text & where AniTypes='" & AniTypestxt.Text & "'"), Animals

here i dont understand why using ,Animals after the AnimalRS.open(), if its a connection object then need to write as following:-

AnimalRS.Open ("select * from " & AniKindtxt.Text & " where AniTypes='" & AniTypestxt.Text & "'",Animals,2,3)

if it isn't your Connection object then put the connection object name in the place of Animals.

hope this helps you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.