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
Bharathi Raja
NA
1.1k
54.5k
The Microsoft Jet database engine could not find the object
May 2 2018 5:09 AM
The Microsoft Jet database engine could not find the object 'test'. Make sure the object exists and that you spell its name and the path name correctly.
if
(txtFileName.Text !=
""
)
{
//string path = @"D:\BARATHIRAJA\SUPER MARKET\GST\stock management\bin\Debug\add_product.csv";
string
path = txtFileName.Text;
string
id =
""
;
string
pimage =
""
;
string
cate =
""
;
string
subcat =
""
;
string
pcode =
""
;
string
peng =
""
;
string
ptam =
""
;
string
barcode =
""
;
string
unit =
""
;
string
promrp =
""
;
string
procast =
""
;
string
pprice =
""
;
string
aqty =
""
;
string
alertqty =
""
;
string
pdetail =
""
;
string
tax =
""
;
string
mdate =
""
;
string
edate =
""
;
OleDbConnection my_con =
new
OleDbConnection(
"Provider=Microsoft.Jet.OleDb.4.0;"
+
"Data Source="
+ Application.StartupPath +
"\\test.xls;"
+
"Extended Properties=Excel 8.0"
);
my_con.Open();
// OleDbCommand icmd = new OleDbCommand("select [id],[product_image],[category],[sub_category],[product_code],[product_english],[product_tamil],[barcode],[unit],[product_mrp],[product_cost],[product_price],[available_quantity],[alert_quantity],[product_detail],[tax],[man_date],[exp_date] from ["+my_con+"]", my_con);
OleDbCommand icmd =
new
OleDbCommand(
"select * from [test] "
, my_con);
//this line eroor Throw
OleDbDataReader dr = icmd.ExecuteReader();
while
(dr.Read())
{
id = dr[0].ToString();
pimage = dr[1].ToString();
cate = dr[2].ToString();
subcat = dr[3].ToString();
pcode = dr[4].ToString();
peng = dr[5].ToString();
ptam = dr[6].ToString();
barcode = dr[7].ToString();
unit = dr[8].ToString();
promrp = dr[9].ToString();
procast = dr[10].ToString();
pprice = dr[11].ToString();
aqty = dr[12].ToString();
alertqty = dr[13].ToString();
pdetail = dr[14].ToString();
tax = dr[15].ToString();
mdate = dr[16].ToString();
edate = dr[17].ToString();
MySqlConnection con =
new
MySqlConnection(
"SERVER=localhost;"
+
"DATABASE=shop_management;"
+
"UID=root;"
+
"PASSWORD=;"
);
con.Open();
MySqlCommand icmmd =
new
MySqlCommand(
"INSERT INTO add_product(id,product_image,category,sub_category,product_code,product_english, product_tamil, barcode,unit,product_mrp,product_cost,product_price,available_quantity,alert_quantity,product_detail,tax,man_date,exp_date)VALUES(@a,@b,@c,@d,@e,@f,@g,@h,@i,@j,@k,@l,@m,@n,@o,@p,@q,@r)"
, con);
icmmd.Parameters.AddWithValue(
"a"
, id);
icmmd.Parameters.AddWithValue(
"b"
, pimage);
icmmd.Parameters.AddWithValue(
"c"
, cate);
icmmd.Parameters.AddWithValue(
"d"
, subcat);
icmmd.Parameters.AddWithValue(
"e"
, pcode);
icmmd.Parameters.AddWithValue(
"f"
, peng);
icmmd.Parameters.AddWithValue(
"g"
, ptam);
icmmd.Parameters.AddWithValue(
"h"
, barcode);
icmmd.Parameters.AddWithValue(
"i"
, unit);
icmmd.Parameters.AddWithValue(
"j"
, promrp);
icmmd.Parameters.AddWithValue(
"k"
, procast);
icmmd.Parameters.AddWithValue(
"l"
, pprice);
icmmd.Parameters.AddWithValue(
"m"
, aqty);
icmmd.Parameters.AddWithValue(
"n"
, alertqty);
icmmd.Parameters.AddWithValue(
"o"
, pdetail);
icmmd.Parameters.AddWithValue(
"p"
, tax);
icmmd.Parameters.AddWithValue(
"q"
, mdate);
icmmd.Parameters.AddWithValue(
"r"
, edate);
icmmd.ExecuteNonQuery();
con.Close();
}
MessageBox.Show(
"data Imported"
);
txtFileName.Text =
""
;
}
Reply
Answers (
2
)
VB.net Image Upaditng Problems
How to develop C# windows based artificial intelligence in