|
-
Jun 26th, 2006, 08:49 PM
#1
Thread Starter
Hyperactive Member
CREATEPARAMETER class??
I have a SQL statements stored in the config.xml file.
There is a WHERE clause in the sql statements. The values in the Where clause will be known only at runtime. How can I do this? Some one suggested me to use OLEDBParameter object.
The sql statement is read from config.xml file
//The value of sTerm will changed based on the resultset of previous query.
string sTerm = "Overnight";
ssql = "SELECT Term, BenchMark FROM RATESLIVE WHERE Pricing_Tier = 1 AND Term = '" + sTerm + "'";
OleDbConnection oMSAccessConnection = new OleDbConnection(sConnectionstring);
OleDbCommand oMSAccessCommand = new OleDbCommand(ssql, oMSAccessConnection);
oMSAccessConnection.Open();
OleDbDataReader oDataReader = oMSAccessCommand.ExecuteReader();
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|