Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Contacts / March 2006

Tip: Looking for answers? Try searching our database.

insert data in SQL using Asp

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
safs - 30 Mar 2006 13:21 GMT
Hello,

I am trying to insert data into sql using asp.
I have developed a asp page named insert.
i am using the bellow code....
I am geting the  following code can any one help me

the code is
<%
'declare your variables
dim connection
dim sSQL, sConnString

'declare SQL statement that will query the database
sSQL="INSERT INTO testtable (Name, Contact) VALUES ('Michael', 123)"

'define the connection string, specify database
' driver and the location of database
sConnString="PROVIDER=SQLOLEDB.1;Data
Source=sys2;UID=sa;pwd="";database=INFIN;"

'create an ADO connection object
Set connection = Server.CreateObject("ADODB.Connection")

'Open the connection to the database
connection.Open (sConnString)

'execute the SQL
connection.execute(sSQL)

response.write "The data was inserted successfully."

'close the object and free up resources
Connection.Close
Set Connection = Nothing
%>

and the ERROR IS

ADODB.Connection (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
Ken Slovak - [MVP - Outlook] - 30 Mar 2006 15:25 GMT
I'd post this in a SQL or ASP group. This has nothing to do with Outlook
that I can see.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hello,
>
[quoted text clipped - 38 lines]
> Arguments are of the wrong type, are out of acceptable range, or are in
> conflict with one another.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.