Problem Querying MSysObjects(ms-access table)
-
Hi all, When i try to query MsysObjects table following error is caught(try-catch). [B]Database error: Too few parameters.Expected 2.[/B] These are the two lines used to run the SQL query in vc++. // Build the SQL statement SqlString = "SELECT Name FROM MSysObjects where type = 1 AND (Left([Name],4) <> \"Msys\") AND (Left([Name],1) <> \"~\")"; // Execute the query recset.Open(CRecordset::forwardOnly,SqlString,CRecordset::readOnly); I am using CDatabase class. Please Help! Regards, Ankush Mehta Ankush Mehta
-
Hi all, When i try to query MsysObjects table following error is caught(try-catch). [B]Database error: Too few parameters.Expected 2.[/B] These are the two lines used to run the SQL query in vc++. // Build the SQL statement SqlString = "SELECT Name FROM MSysObjects where type = 1 AND (Left([Name],4) <> \"Msys\") AND (Left([Name],1) <> \"~\")"; // Execute the query recset.Open(CRecordset::forwardOnly,SqlString,CRecordset::readOnly); I am using CDatabase class. Please Help! Regards, Ankush Mehta Ankush Mehta
"SELECT Name FROM MySysObjects WHERE type=1 AND((Left([Name],4)<>\'Mysys\')AND(Left([Name],1)<>\'~\'))";
Rajesh R. Subramanian You have an apple and me too. We exchange those and We have an apple each. You have an idea and me too. We exchange those and We have two ideas each. -
"SELECT Name FROM MySysObjects WHERE type=1 AND((Left([Name],4)<>\'Mysys\')AND(Left([Name],1)<>\'~\'))";
Rajesh R. Subramanian You have an apple and me too. We exchange those and We have an apple each. You have an idea and me too. We exchange those and We have two ideas each.Thanks a lot Subramaniyam . it works, just a little modification is required: SqlString ="SELECT Name FROM MSysObjects WHERE type = 1 AND((Left([Name],4) <> \'MSys\')AND(Left([Name],1) <> \'~\'))"; Heartfelt thanks, Ankush Mehta Ankush Mehta