Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
connecting to oracle using vbscript
#5
Solved: 10 Years, 9 Months ago
Try this out:

Code:
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3
Set ObjCon=createobject("adodb.connection")
Set ObjRec=createobject("adodb.recordset")
ObjCon.open "Data Source=FITN;server=oracle_server;uid=user1;pwd=passwd;db=yourDBName"
ObjRec.CursorLocation = adUseClient
ObjRec.CursorType = adOpenStatic
ObjRec.LockType = adLockOptimistic

ObjRec.Source="select ir.cusip from market.instrument ir where ir.cusip ='20172KC78' adOpenStatic,adLockOptimistic"
While not(ObjRec.EOF)
ObjRec.ActiveConnection=ObjCon
ObjRec.Open
Msgbox "Result " & ObjRec.Fields.Item("cusip")&vbCrLf
ObjRec.MoveNext
ObjRec.Close

Copy paste the whole thing.. Just u have to enter db value(delete yourDBname and pass the actual dbname)

Hope this works...

Regards,
Ritesh
Reply


Messages In This Thread
connecting to oracle using vbscript - by snandini - 01-27-2009, 12:11 AM
RE: connecting to oracle using vbscript - by ritesh - 07-06-2009, 08:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Request Help | Usage of Oracle Add-In for Oracle SQL Developer Nasir Ahmed 3 3,334 06-18-2014, 04:28 PM
Last Post: vinod123
  Connecting MQ to QTP through VBScript Priya.Shah134 0 4,239 05-22-2010, 03:33 PM
Last Post: Priya.Shah134
  Connecting to Oracle DB via JDBC using QTP vishnuvpotty 3 14,689 02-25-2010, 10:45 AM
Last Post: Saket
  Connecting Linux machine from QTP gauri 0 2,798 02-18-2010, 03:51 PM
Last Post: gauri
  Why Constant Variables while connecting to DB mona 4 4,742 07-27-2009, 02:16 PM
Last Post: mona

Forum Jump:


Users browsing this thread: 1 Guest(s)