Question

Locked

vb6.0 + ADO + Win Vista = Erro 2147467259

By tostafig ·
I have an aplication developed in VB6.0, wok fine in win 98, ME, XP, 2000, 2003, but now dont work in Win Vista.

After hours trying resolve the problem, installing MDAC 2.7 and 2.8 , set debug points in code, I have identify where is the bug but I dont know the solution. Fowlling is the code:
-----------------------------------------------
Private Function ConnectToMyDatabaseSF() As ADODB.Connection
On Error GoTo erro

Dim conn As Connection
Dim connStr As String
Dim errNum As Long
Dim errDesc As String
Dim X As String

connStr = ConnectionString("MyDataBase") ' is to get and make a connectionstring


MsgBox connStr


Set conn = New Connection

With conn
.ConnectionString = connStr
.CursorLocation = adUseClient
.open
End With
Set ConnectToMyDatabaseSF= conn

MsgBox conn.ConnectionString


Exit Function
erro:

' My error handling

end function
-----------------------------------------------


In Win XP, 2000:

The first messagem is: "driver={SQL Server};server=myServerName;database=MyDatabase;uid=sa;pwd=mysapass"

the second message is: Provider=MSDASQL.1;Extended Properties="DRIVER=SQL Server;SERVER=myServerName;UID=sa;PWD=mysapass;APP=Visual Basic;WSID=myServerName;DATABASE=MyDatabase"

In Win Vista:

The first messagem is: "driver={SQL Server};server=myServerName;database=MyDatabase;uid=sa;pwd=mysapass"

the second message is: "Provider=MSDASQL.1;"

Why is connectionstring truncated in win vista?

Any sugestion to solve this?

thanks!

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Try here

by Tony Hopkinson In reply to vb6.0 + ADO + Win Vista = ...
Collapse -

chang connection string

by tostafig In reply to Try here

Thanks Tony!
Yes, connection string is the point.

Today try add parameter "Persist Security Info=True" to connection string, I never use that parameter before, now is working! :)

Collapse -

chang connection string

by gderas2 In reply to chang connection string

Thanks for share the information, now is working!

Collapse -

change connection string

by tostafig In reply to Try here

Thanks Tony!
Yes, connection string is the point.

Today try add parameter "Persist Security Info=True" to connection string, I never use that parameter before, now is working! :)

Collapse -

change connection string

by pavleb_grp In reply to change connection string

"Persist Security Info=True" Fixed the problem for us too. Thanks

Back to Networks Forum
5 total posts (Page 1 of 1)  

Related Forums