VB6 Prompt Errors

Posted on 2005-04-07
Last Modified: 2008-02-01
Hi everyone,

I've been evaluating CR-11 for about 3 weeks now and come to a grinding halt!  The report has just about been completed so I want to put it into my VB frontend, but I can't get around the errors.

The 2 errors I get are:
-Prompting failed with the following error message: " Error source: Error code: 0x80004005
-Logon failed.  Details [Database Vendor Code: 18456

I successfully compiled a report a few weeks ago in VB with prompts.  But the problem seems to come in when I introduced the dynamic prompts - Is there a way that VB6.0 can cope with this by adding references or something?

I've now removed the dynamic prompts but I still can't get it to work.  Any suggestions?

Thanks again;)

Question by:loopyadc
    LVL 10

    Expert Comment

    Do a search on "0x80004005" on this site. There are a couple of threads might help you.

    LVL 4

    Assisted Solution

    Hi loopyadc,

    I found this link (from BO Forum) that talks about this particular error.
    Kindly take a look at this...maybe it can help you one way or the other.


    LVL 100

    Expert Comment

    Can you show the code?


    Author Comment

    Hi mlmcc,

    I haven't written any code in my VB app.

    I noticed that in the VB app I got to work the CR-11 report was using saved data (so probably wasn't actually querying the db).

    I had assumed that when I ran the report in CR developer and had entered the sql db user name and pw that it had been saved and would use the same ODBC connection in the VB app.  Now in the VB app I am not prompted for a user name and pw.  Are there any properties I should set with the Username and Password?

    I have used the ODBC and Query Test Utility and my ODBC connection is fine there, but I'm not sure how to define this in the VB app.
    Do I just use a normal ODBC connection?  How do I get CR Viewer to use that connection?

    Many thanks

    Author Comment

    I found this code to use with an earlier version - I do want to use the same ODBC that I had specified in the report.
    There are no crpctrlPrint object in the CR11 library I'm using for the viewer control.

    Am I on the right track?

    crpctrlPrint.Connect = "DSN=" & gsDSName & ";" & gsConnectionString   'your connection details
    crpctrlPrint.ReportFileName = "Report.rpt"  'your report


    crpctrlPrint.ReportFileName = ""

    LVL 100

    Accepted Solution

    LVL 100

    Expert Comment

    Glad i could help


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    745 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

    16 Experts available now in Live!

    Get 1:1 Help Now