Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 496 | Replies: 1 | Solved
![]() |
•
•
Join Date: Mar 2008
Posts: 55
Reputation:
Rep Power: 1
Solved Threads: 1
hai i am using the following code to apply the watermark and save in specific location and then upload the image to database
up to this the program work's perfectly while upload to the database i show the error ..
in that com.ExecuteNonquery() the error show's like (no mapping exits from object type system.drawing .Bimap to a known managed provider native type)
plz reply me .............
asp Syntax (Toggle Plain Text)
[ byte[] img1 = new byte[fileupload1.postedfile.contentlength]; Httppostedfile image = fileupload1.postedfile; image.Inputstream.read(img1,0,(int)fileupload1.postedfile.contentlength); Bitmap bm1 = new bitmap(new system.IO.Memorystream(imd1)); Graphics grp = Graphics.FromImage(bm1); grp.smoothingMode = smoothingMode.AntiAlise; grp.Drawstring("name" ,new font("Arial",20),systemBrushes.WindowText,250,250); string a1 = server.mapPath(@"image\\winteer1.jpg"); bm1.save(a1); image1.imageurl=a1; Bitmap a2 = new Bitmap(image1.imageurl);
up to this the program work's perfectly while upload to the database i show the error ..
asp Syntax (Toggle Plain Text)
sql connection con = new sql connection (conn); sql command com = new sqlcommand (insert into ); com.parameters.Addwith value("@image",a2); con.open(); com.ExecuteNonquery(); con.close();
in that com.ExecuteNonquery() the error show's like (no mapping exits from object type system.drawing .Bimap to a known managed provider native type)
plz reply me .............
Last edited by peter_budo : Apr 4th, 2008 at 5:30 am. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,657
Reputation:
Rep Power: 12
Solved Threads: 311
This post is marked as solved. Did you find solution? Would you mind to share it with others?
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, JAVAWUG (Java Web User Group), Coding the Architecture
Publilius Syrus
(~100 BC)
LJC - London Java Community, JAVAWUG (Java Web User Group), Coding the Architecture
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode