1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Anyone here have any oracle / VB 6 experience?

Discussion in 'Software' started by Wookie, Aug 10, 2004.

  1. Wookie

    Wookie Sergeant Major

    Worth a shot im not getting a big reply at other forums and I am kind of stuck.

    Heres my problem if anyone knows anything about databases

    I am trying to connect to an oracle database. There is an oracle ODBC driver on the system with a DSN set up called tns:live

    The driver name is sqora32.dll

    I tried connecting to it like this
     Dim oCn1 As ADODB.connection 
     Dim oRs1 As ADODB.Recordset 
     Dim connection1 As String 
     connection1 = "Provider=MSDAORA.1;Password=xxxx;User ID=xxxx;Data Source=tns:live;Persist Security Info=True" 
     oCn1.Open connection1 

    It didnt work. I am guesssing because the driver is different. Would I change the provider and what would I change it to?

    I also have an excel file using VB that connects just fine like this:
     Sub RetrieveData() 
     Dim Chan As Variant 
     Dim Stmt As String 
     Chan = SQLOpen("DSN=Live Database") 
    from what ive researched thats using xlodbc.xla which is an excel add in. I dont think I can use sqlopen in VB 6, but correct me if I am wrong.

    Should I research SQLopen more or is it just a driver name problem? I appreciate any help anyone has to offer. Thanks
    Last edited by a moderator: Aug 10, 2004
  2. Kodo


    have you tried it with out doing a DSN?
    make a udl file and configure it appropriately, then edit the udl file with a text editor and there is your string..
  3. Wookie

    Wookie Sergeant Major

    ah sheit man didnt know that would give me a connection string. Ill try that string thanks
  4. Wookie

    Wookie Sergeant Major

    P.S. the name and pass were fake :) thanks anyway tho.
  5. Kodo


    hey, we gotta watch our bro's backs ;)
  6. Kodo


    what's the verdict ?
  7. Wookie

    Wookie Sergeant Major

    Ill find out tomorrow, had to do tech support all day then go troubleshoot an adtran 612 with a cisco Pix. Fun stuff.
  8. Wookie

    Wookie Sergeant Major

    Things arent going good right now the DSN quit working, using oracle net8 config assistant I keep getting a no listener error but the server is up fine, there is an error message on the screen tho but I know nothing about unix and this is a main server for 5 stores :( not a good morning.
  9. Kodo


    do you have the latest MDAC?
  10. Wookie

    Wookie Sergeant Major

    Got it going thankfully, the company called me back (I was shocked) and I guess they restarted the server a while back and the listener service doesnt auto start, they walked me through how to start it so I can connect. My Software keeps erroing out so I am installing oracle client on my work laptop right now so I an connect with it and debug.

    Hopefully Ill figure this crap out :) I got the connection strung from the UDL file tho thanks.
  11. Wookie

    Wookie Sergeant Major

    Heres my problem, when I try to open I am geting this error

    "error cannot load resource file sqresus.dll"

    Wonder why I am getting that
  12. Kodo


    Try reinstalling your Oracle ODBC driver and reboot.
  13. Wookie

    Wookie Sergeant Major

    reboot worked

    now I am getting this error here

    oRs1.Open "ITM_PUR_HST", oCn1, adOpenKeyset, adLockOptimistic, adCmdTable

    Error: Object variable or with block variable not set

    boy debugging is fun :)
  14. Kodo


    why are you opening up a whole table? that's slow. You should pick the fields you want even if you want them all.
  15. Wookie

    Wookie Sergeant Major

    I got it to work, ill refine everything later I am just making sure I can get the connection going.

    Set oCn = New ADODB.connection
    Set oRs = New ADODB.Recordset
    I had forgotten that :)

    I am rushed right now ill refine my SQL later, gotta go fix an email now then go listen to my boss bitch that I havnt got this done after he sends me 3 other places.

    I love computers :)
  16. Wookie

    Wookie Sergeant Major


    Its the greatest feeling to see something you created work :)

    Thanks for your help Kodosan
  17. Kodo


    I hear that my man! :)
  18. Wookie

    Wookie Sergeant Major

    Ill have to get on making that SQL statement it takes forever to extract it lol
  19. Wookie

    Wookie Sergeant Major

    yeah about 2 minutes only got me 1200 records, very slow
  20. Kodo


    holy crap.. yeah man.

Share This Page

MajorGeeks.Com Menu

MajorGeeks.Com \ All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ NEW! PC Games \ System Tools \ Macintosh \ Demonews.Com \ Top Downloads

MajorGeeks.Com \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds