betto
Jul 11th, 2000, 02:04 PM
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:
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:
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 :)
betto@mail.com
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:
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:
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 :)
betto@mail.com