A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Contacts
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

insert data in SQL using Asp



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 30th 06, 02:21 PM posted to microsoft.public.outlook.contacts
safs
external usenet poster
 
Posts: 17
Default insert data in SQL using Asp


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.

  #2  
Old March 30th 06, 04:25 PM posted to microsoft.public.outlook.contacts
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default insert data in SQL using Asp

I'd post this in a SQL or ASP group. This has nothing to do with Outlook
that I can see.

--
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


"safs" wrote in message
oups.com...

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.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
automatically schedule calender meeting from asp page yfnitg Outlook - Calandaring 2 March 29th 06 05:28 PM
How do I call a stored procedure inside my sql with a vba script? Computer Newbie Outlook and VBA 1 March 14th 06 08:08 AM
Reinstalling BCM after SQL Installation Failure Brado Outlook - Installation 0 February 1st 06 05:01 PM
Error Msg. - Project was not connected through SQL Server Database Heather Outlook - General Queries 1 January 27th 06 04:13 PM


All times are GMT +1. The time now is 11:30 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.