error in inserting data into access database using OleDB web application

This is a discussion on error in inserting data into access database using OleDB web application within the sqlserver-odbc forums in Microsoft SQL Server category; following code in vb script arising no error(i.e. debugging without any error, even then not inserting data from those three textbox control into the access database name.mdb having the table details,after clicking the button named btnadd) sub btnadd(sender as object,e as eventargs) dim con as OleDBConnection dim com as OleDBCommand dim str as string dim i as integer try con=new OleDBConnection( provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\WebSite\database2\name.mdb; ) con.open() str= insert into details values( &(t1.text)& , &(t2.text)& , &Cint(t3.text)&...

Go Back   Database Forum > Microsoft SQL Server > sqlserver-odbc

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-13-2008, 01:50 PM
Default error in inserting data into access database using OleDB web application

following code in vb script arising no error(i.e. debugging without any
error, even then not inserting data from those three textbox control
into the access database name.mdb having the table details,after
clicking the button named btnadd)

sub btnadd(sender as object,e as eventargs)

dim con as OleDBConnection
dim com as OleDBCommand
dim str as string
dim i as integer

try
con=new OleDBConnection("provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\WebSite\database2\name.mdb;")
con.open()
str="insert into details
values("&(t1.text)&","&(t2.text)&","&Cint(t3.text)&")"
com=new OleDBCommand(str,con)
i=com.Executenonquery()
if i>0 then
l1.text="one record added"
end if
catch es as exception
l1.text=es.message
finally
con.close()
end try

end sub

--------------------




BorderColor="#ff00ff" AlternatingItemStyle-Font-Bold="True"
AlternatingItemStyle-BorderColor="#ff0000">













PLEASE GIVE DETAILS OF THAT PROBLEM???????????

Anirban Chakraborty
pompai2005-at-gmail.com

*** Sent via Developersdex http://www.developersdex.com ***
Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 02:43 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.