0

Hi guys,
I am inserting value from xml file to access database the file is near about 6 MB (size not problem) but the file contains mathematics questions containing images(jpeg,bmp),equations(math type) so while inserting some questions it will give an error "Query Is Too Complex "

can anybody tell me how to resolve this thread.....
Thanks in advance.

3
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by thines01
0

Access has a limit of 16 JOINs and that error appears when you have exceeded that limit. You'll need to find a way to reduce the number before it will work.

0

Hi,
table contains 12 fields and doesn't using the join it's plain insert query.

string insertstt = "insert into starttest values (" + kl + ",'" + testno + "'," + que_id + "," + subcode + "," + chapcode + ",'" + que + "','" + opt1 + "','" + opt2 + "','" + opt3 + "','" + opt4 + "','" + ans + "','" + solution + "')";

Ocmd = new OleDbCommand(insertstt, Connect.AccConn());

Edited by bhagawatshinde: n/a

0

Have you looked at the resulting string after it is concatenated?
It may be worse than you think.

Also, you should not init-and-embed your connection inside your command.

0

Also, a statement like that makes an assumption about columnn order.
It might make it easier for the parser if you name the columns and then the values

INSERT INTO starttest(col1, col2, col3) VALUES(val1, val2, val3)
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.