Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon Failure when using UNC path - Crystal 9 - HELP!!

Status
Not open for further replies.

swaykid

IS-IT--Management
Oct 16, 2003
13
0
0
ES
We have just upgraded our VB6 app from crystal 8.5 to 9. All we have done is replace the viewer component and references.

All works perfectly when accessing a the local Access2000 database. All works perfectly when accessing the database when on a mapped drive. The problem occurs when attempting to use a UNC path. We have previewed the reports in the designer using UNC paths and we used UNC paths before we upgraded without problem. The only time it occurs is in the application.

The error comes up when verifying the database.

error no: -2147189176 Logon failed
DAO error: 0xbd0
Could not find file: xyz.mdb


Any ideas as I have tried everything I can think of but nothing.
 
OK, what sort of connectivity are you using?

You have options of direct or ODBC, if one fails try the other.

-k
 
I figured it out today. Basically it was not assigning the path correctly to the db location so I did this little bit of code to set the db locations within the report at runtime.

'COGER RUTADB DEL REPORT Y SACAR LA BASE DE DATOS DEL REPORT. ADAM18/12/2006 TO CORRECT CRYSTAL 9 DBPATH BUG
Dim CONNPROP As CRAXdrt.ConnectionProperties
Dim CONNPROP2 As CRAXdrt.ConnectionProperties
Dim strdb As String
Set CONNPROP = .Database.Tables(1).ConnectionProperties

strdb = GetFileName(CStr(CONNPROP.Item("Database Name")))

Dim I As Integer
For I = 1 To .Database.Tables.Count
Set CONNPROP2 = .Database.Tables(I).ConnectionProperties

'CHECK OTHER TABLES IN REPORT TO SEE IF THEY CONTAIN A DIfferent DBASE PATH
If strdb <> GetFileName(CStr(CONNPROP2.Item("Database Name"))) Then
'GET AND SET NAME FOR OTHER DATABASE IN REPORT
CONNPROP2.Item("Database Name") = ruta_db & "\" & GetFileName(CStr(CONNPROP2.Item("Database Name")))
End If
Next I
CONNPROP.Item("Database Name") = ruta_db & "\" & strdb
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Works a treat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top