Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Connecting to an oracle database using ADO.

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,313
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Connecting to an oracle database using ADO.
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Connecting to an oracle database using ADO. - 8/2/2001 7:04:07 AM   
  bluntman

 

Posts: 1
Score: 0
Joined: 8/2/2001
From: Trinidad and Tobago
Status: offline
I'm creating a webpage that requires to update information on an oracle database. I'm using the ADO object to do this, but I am however running into problems. I'm testing the script on a local oracle database before I implement it onto the actual one. I'm getting the error "Arguements are of wrong type, are out of acceptable range, or are in conflict with one another." with the CursorLocation and LockType properties. However, the values are quite valid so it has left me dumbfounded. Here is the sample code:

<HTML><HEAD>
<TITLE>ADO Move Methods</TITLE></HEAD>

<BODY>

<FONT FACE="MS SANS SERIF" SIZE=2></font>

<H3>ADO Move Methods</H3>

<script language = "VBscript">
File = "ADOVBS.INC"
Dim OBJdbConnection
Dim RsCustomerList
Dim NumRecs
Dim strcnn

Set OBJdbConnection = CreateObject("ADODB.Connection")
strcnn = "provider = msdaora; password=tiger; user id=scott;"
OBJdbConnection.CursorLocation = adUseClient
OBJdbConnection.Open strcnn

Set RsCustomerList = CreateObject("ADODB.Recordset")
RsCustomerList.ActiveConnection = OBJdbConnection
RsCustomerList.CursorType = adOpenDynamic
RsCustomerList.LockType = adLockOptimistic
RsCustomerList.Source = "EMP"
RsCustomerList.Open
RsCustomerList.MoveLast
RsCustomerList.AddNew
RsCustomerList("EMPNO") = "60"
RsCustomerList.Update
MsgBox(RsCustomerList.Fields(0))
NumRecs = RsCustomerList.RecordCount
MsgBox("Customer Table has " & NumRecs & " Records")
</script>

</BODY>
</HTML>

Help will be greatly appreciated on this issue.

Thanks,
Kavir.
 
 
Post #: 1
 
 Re: Connecting to an oracle database using ADO. - 9/8/2001 6:40:07 PM   
  thushara

 

Posts: 2
Score: 0
Joined: 9/8/2001
From:
Status: offline
have u been able to sort ur problem out

(in reply to bluntman)
 
 
Post #: 2
 
 Re: Connecting to an oracle database using ADO. - 10/29/2002 4:01:10 AM   
  rkh

 

Posts: 5
Score: 0
Joined: 10/29/2002
From: Jordan
Status: offline
try this code that i work with to connect
my database in SQL server
<%Dim ConnectionString
Dim ADO

ConnectionString="provider=SQLOLEDB.1;persist security info=false;User ID=;password=;initial catalog=;Data Source= "

Set ADO=Server.CreateObject("ADODB.Connection")
ADO.ConnectionString =ConnectionString
ADO.Open
%>
<%ADO.close%>

rkh

(in reply to bluntman)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Connecting to an oracle database using ADO. Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts