[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2003-12-04
8
Medium Priority
?
2,477 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
7 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 1

Accepted Solution

by:
Krash_io earned 400 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

834 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