Results 1 to 2 of 2

Thread: Client Acces and ODBC

  1. #1

    Thread Starter
    Member betto's Avatar
    Join Date
    Mar 2000
    Location
    Perú
    Posts
    38

    Question

    Hi I hope you could help me...

    I'm using VB5 and Client Acces V.3 release 2.
    There isa AS/400 connection created and its Default user is "GADMIN"
    I'm trying to create a connection with another user, "ADMNET"...
    this is my code:

    Code:
    Private Sub Connection_Init()
    
     On Error GoTo ERRORES
    
     Screen.MousePointer = vbHourglass
     
     Set grdoEng = rdoEngine
     
     With grdoEng
       .rdoDefaultCursorDriver = rdUseOdbc
       .rdoDefaultLoginTimeout = 120
       .rdoDefaultPassword = "ADMNET"
       .rdoDefaultUser = "ADMNET"
     End With
     
     Set grdoEnv = grdoEng.rdoCreateEnvironment(OdbcNew, "ADMENT", "ADMNET")
     
     With grdoEnv
       .CursorDriver = rdUseOdbc
       .LoginTimeout = 60
     End With
     
     Set grdoCon = grdoEnv.OpenConnection(OdbcNew, rdDriverNoPrompt, False, , rdAsyncEnable)
     
     While grdoCon.StillConnecting
        'DoEvents
     Wend
     
     Screen.MousePointer = vbdeafult
     Exit Sub
     
    ERRORES:
     Call MsgBox("It happened an error:" + Err.Description, vbExclamation, "Error#" + Str(Err.Number))
      Screen.MousePointer = vbDefault
    
    End Sub
    the variables connections are:

    Code:
    Public groEng As rdoEngine
    Public grdoEnv As rdoEnvironment
    Public grdoCon As rdoConnection
    before.. i have already created a ODBC User in
    >>settings
    >>>>Control Panel
    >>>>>>ODBC Data Sources
    its name is OdbcNew and its User Id is "ADMNET"

    then .. when i see my AS400 connections window... there is no a Current User ADMNET... this place continues blank..
    but Status is Connected

    what was happend... why it doesnt work!!!

    Is there something which i made wrong????
    and.. if this is not the right way, what is????

    ...thanks anyway for listening me...

    betto
    [email protected]


  2. #2
    Guest
    Way to slow. all you will be doing is looking at a query timeout msgbox or waiting for your connections to open check this site out http://www.cstool.com/product.htm
    killer tool kinda expensive?

    Or try ADO Lightning, That works with Client access. It's on IBM's site somewhere
    search for it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width