Solved

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

Posted on 2003-12-04
8
2,464 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

707 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

12 Experts available now in Live!

Get 1:1 Help Now