Solved

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

Posted on 2003-12-04
8
2,471 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

690 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