Showing posts with label isconnected. Show all posts
Showing posts with label isconnected. Show all posts

Sunday, March 11, 2012

Connection.close returns a 91 error code...

I have the next code in my proyect:

If CurrentProject.IsConnected Then
MsgBox "Base ya Conectada.Procedemos a cerrarla primero", vbOKOnly
If SQLConexion.State = adStateOpen Then SQLConexion.Close
SQLConexion.Close
End If
SQLConexion.Open SQLSentencia
AbreConexionSQLSERVER = 0

If I detect that the connection is opened while I am initializazing varriables, I want to close always the connection and then begins my aplicattion always opening the connection, but it always returns a error 91..

suggestions?

hi,

the message text instead of the error code would better help, but your code actually closes the conntection 2 times in the IF block, and this usually results in an axception to be raised..

regards

Thursday, March 8, 2012

Connection to SQL Server 2000 with PB 6.5

Currently I am using PB 6.5 with MS SQL Server 6.5. Would it work if it is
connected to SQL Server 2000? Please advice me. Thank you.
Is PB PowerBuilder?
Generally speaking, sure a 6.5 app should be able to connect to a SQL Server
2000 machine. Honestly, I've never done it. However, there are differences
between 6.5 and 2000 that could cause your queries to behave differently.
You might want to think about testing under a 6.5 compatibility mode.
Brian
"Tony" <Tony@.discussions.microsoft.com> wrote in message
news:8C783B6C-7717-4876-8EB3-4EC06E01E595@.microsoft.com...
> Currently I am using PB 6.5 with MS SQL Server 6.5. Would it work if it is
> connected to SQL Server 2000? Please advice me. Thank you.
>
|||Yes Brian, PB is PowerBuilder. Thank you for your information.
"Tony" wrote:

> Currently I am using PB 6.5 with MS SQL Server 6.5. Would it work if it is
> connected to SQL Server 2000? Please advice me. Thank you.
>

Connection to SQL Server 2000 with PB 6.5

Currently I am using PB 6.5 with MS SQL Server 6.5. Would it work if it is
connected to SQL Server 2000? Please advice me. Thank you.Is PB PowerBuilder?
Generally speaking, sure a 6.5 app should be able to connect to a SQL Server
2000 machine. Honestly, I've never done it. However, there are differences
between 6.5 and 2000 that could cause your queries to behave differently.
You might want to think about testing under a 6.5 compatibility mode.
Brian
"Tony" <Tony@.discussions.microsoft.com> wrote in message
news:8C783B6C-7717-4876-8EB3-4EC06E01E595@.microsoft.com...
> Currently I am using PB 6.5 with MS SQL Server 6.5. Would it work if it is
> connected to SQL Server 2000? Please advice me. Thank you.
>|||Yes Brian, PB is PowerBuilder. Thank you for your information.
"Tony" wrote:

> Currently I am using PB 6.5 with MS SQL Server 6.5. Would it work if it is
> connected to SQL Server 2000? Please advice me. Thank you.
>