TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
faraz akram
NA
129
0
Problem in dynamic sql - Table Adapters C# 2008
Nov 2 2009 3:05 AM
hi , i have developed a search screen that takes dynamic "where" clause in sql select on runtime depend upon user input. the code is mentioned below.... -------------------------------------------------- OdbcConnection odbc_conn = new OdbcConnection("connection string"); OdbcDataAdapter odbc_da = new OdbcDataAdapter("select * from my_table" + whereclause, odbc_conn); odbc_da.FillSchema(dataSet1, System.Data.SchemaType.Source, "my_table"); odbc_da.Fill(dataSet1, "my_table"); my_table.BindingSource.DataSource = dataSet1.Tables["my_table"]; -------------------------------------------------- "Fill" is the query that i created in the dataset1 designer the normal through wizard in the my_tabletableadapter. Now first time it works fine and selecting the data on basic of parameters in "WHERECLAUSE" but second time it does not override the previous sql with a new sql , where clause is changing prperly on user input but the time when it comes on this line of code odbc_da.FillSchema(dataSet1, System.Data.SchemaType.Source, "my_table"); it shows the previous dataset , any help regards fazy sam
Reply
Answers (
3
)
How to set page orientation programmaticaly in print preview dialog of microsoft web browser control?
Loosing pefix of the messages when append to textbox