Solved

(Urgent pls help!!!) Problem with Crystal report and Visual Basic

Posted on 2003-12-04
8
2,466 Views
Last Modified: 2013-11-25
Hi,
I'm getting error: Run-time error 20534 Error detected by database DLL
                error: Run-time error 20599 Cannot open SQL server
I'm working with VB6 and crystal report 8.5, SQL server 2000 as database. I'm developing an application where the database in located on server side. When I first test it on my own computer where my database is local, it work fine. my code is as follow:

Public Function printPacking(strInvoice As String)


    With ShippingDocumentsPrint
        .crpt.Reset
        .crpt.ReportFileName = App.Path & "\report\Packing_List.rpt"
   'crpt.Formulas(0) = "invoice='Hello'"
        .crpt.SelectionFormula = "{Packing_List.P_invoice_no}='" & strInvoice & "'"
        .crpt.Connect = oDBConn.ReportStr
   
        .crpt.WindowState = crptMaximized
        .crpt.PrinterSelect
        .crpt.Action = 1
       
    End With
       
End Function

In another class:

Public Property Get ReportStr()
   
    openConfig

    ReportStr = "DSN=" & ServerName & ";UID=TTACTIF;PWD=ttspl;DSQ=" & DBName
   
End Property

But when i migrate the database to server,  I use the same String for normal ADODB connection, it works with no error either when the database is on my comp or it's on server. Only the crystal report and database connection got problem. Run-time error 20534 Error detected by database DLL

I have try to change the UID="" and PWD="" on local, and it works perfectly fine also. So i'm thiking of if there is a different setting of SQL server that make the outcome different, because i believe the sql server on the server might have a more secure setting.

If I run the .exe file then the error is different which is Run-time error 20599 Cannot open SQL server

Urgent, pls help

Thank You


0
Comment
Question by:biao81
8 Comments
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 9878960
You might need to VerifyDatabase, since CR stores the db information, and even a slight change in the db structre, may cause error. You could do this by code, or from CR designer, for the server side database.

Hope it helps.
0
 

Author Comment

by:biao81
ID: 9879380
Well, I have solved the problem by doing the Set Location. Well i test it on my computer it works already. But this morning when i'm installing it on customer side, the error pop up again.

I really have no idea how to solve it already.
I just don't know y.

pls advice
0
 

Author Comment

by:biao81
ID: 9879430
I heard from my friends that i might miss to install some dll file on client pc, because my pc got crystal report, so it wont' have problem, but theirs don't have.
May i know what are the dll file i might miss?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Accepted Solution

by:
Krash_io earned 100 total points
ID: 9880417
The run time files need for your version of Crystal reports can be found here:

http://support.crystaldecisions.com/library/kbase/articles/c2008238.asp


Good Luck
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 9887852
In general, the database structure, used both in customer location and your place, should be exactly same, otherwise, need to VerifyDatabase or Set Location. Also check with installation as already suggested by Krash_io.

Cheers.
0
 

Author Comment

by:biao81
ID: 9901129
Ok, that is actually my own problem when i'm using some installation making software. I solve it already, thnx
0
 
LVL 29

Expert Comment

by:leonstryker
ID: 10267410
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered Krash_io
 
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

leonstryker
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now