good day!

I want to pass the value that contains tha table name and load its data.But my sql turns error.Below is my code.

Combo2.Text = "first_year"

sql = "select * from " & Combo2.Text & "'"
        rs.Open sql, conn, adOpenKeyset, adLockOptimistic, adCmdText

Im using mysql as backend database.

Pls help.God bless on this mother earth.

Thank you for your time.!

Recommended Answers

All 2 Replies

sql = "select * from " & Combo2.Text & "'"

You don't need tick on the end.

Good Luck

commented: Very Helpful +1
sql = "select * from " & Combo2.Text & "'"

You don't need tick on the end.

Good Luck

thank you sir. This problem was solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.