Error connecting 10g with vb6 in vista?

Discussion in 'Oracle' started by mayjune, Sep 24, 2009.

  1. mayjune

    mayjune New Member

    Joined:
    Jun 14, 2009
    Messages:
    814
    Likes Received:
    33
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    Pune,Delhi
    Hi,
    I am using oracle 10g and vb 6 on vista. When i try connecting it i get this
    Error = -2147467259 (80004005)
    Error string: [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

    It works the first time till i don't restart the comp, then if i repair or reinstall it works till I don't restart the computer again. The same problem i faced on other comp which has windows 7. It sounds like maybe vista/7 has some problem, but I know people who are using same config and vista and it works for them without any problem. I don't know how to fix this problem. Please help...
     
  2. nimesh

    nimesh New Member

    Joined:
    Apr 13, 2009
    Messages:
    769
    Likes Received:
    20
    Trophy Points:
    0
    Occupation:
    Oracle Apps Admin
    Location:
    Mumbai
    Home Page:
    http://techiethakkar.blogspot.com
    What ODBC driver are you using?

    and this does not seem to be a vista/7 issue, but a permission issue
     
  3. nimesh

    nimesh New Member

    Joined:
    Apr 13, 2009
    Messages:
    769
    Likes Received:
    20
    Trophy Points:
    0
    Occupation:
    Oracle Apps Admin
    Location:
    Mumbai
    Home Page:
    http://techiethakkar.blogspot.com
  4. mayjune

    mayjune New Member

    Joined:
    Jun 14, 2009
    Messages:
    814
    Likes Received:
    33
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    Pune,Delhi
    how do i check which odbc drivers is it?

    this is what the code is like

    Code:
    Dim ado As ADODB.Connection
    
    Private Sub Form_Load()
        Set ado = New ADODB.Connection
        ado.ConnectionString = "Provider=MSDASQL.1;Password=ppp;Persist Security Info=True;User ID=aaa;Data Source=xxx"
        ado.Open
    end sub
     
  5. nimesh

    nimesh New Member

    Joined:
    Apr 13, 2009
    Messages:
    769
    Likes Received:
    20
    Trophy Points:
    0
    Occupation:
    Oracle Apps Admin
    Location:
    Mumbai
    Home Page:
    http://techiethakkar.blogspot.com
    Have you configured the DSN?

    Data Source=xxx

    xxx - this is the dsn name
     
  6. mayjune

    mayjune New Member

    Joined:
    Jun 14, 2009
    Messages:
    814
    Likes Received:
    33
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    Pune,Delhi
    Hey I got it!!
    Vista/7 is really annoying with its "security" thing!!
    Just goto Vb6.exe file (the main file which runs the vb6)
    If you don't know how to find it
    goto start and goto visual basic 6
    right click and select properties -> open file location
    when you can see the exe file
    right click, goto compatibility -> run as administrator -> ok
    run it and it will work flawlessly.... :)

    Thanks the link you gave me the idea, they gave something different but it clicked me as this i had done for 3d studio max 9 and it worked!

    :D Yeaaa
     
  7. nimesh

    nimesh New Member

    Joined:
    Apr 13, 2009
    Messages:
    769
    Likes Received:
    20
    Trophy Points:
    0
    Occupation:
    Oracle Apps Admin
    Location:
    Mumbai
    Home Page:
    http://techiethakkar.blogspot.com

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice