cancel
Showing results for 
Search instead for 
Did you mean: 

VB6 & CR XI

Former Member
0 Kudos

Have an app that was using cr9 but had difficulty with the reports on 64 bit machines. SAP contends that cr9 is too long in the tooth and that CR XI will solve the problem.

Finally found a msi combining SAP's merge modules for XI. Installed the app on a 64 bit machine/software. Program works but when calling a report this error msg appears: 'Logon Failed. [Database Vendor Code - 534774783].

Any ideas? thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

I doubt this will work on any 64 bit OS but let me know the following:

What's the OS?

The database and database connection type.

And look up the vendor code for your database. This may give you a clue as to what is happening.

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks, Ludek.

Here is what is happening. Used Orca to install the key into the license.msm. Rebuilt the unit and then re-deployed on the 64 bit OS. Now the error msg is logon failed. Here are the details:

Logon Failed.

Details: ADO Error Code: 0x80004005

Source: Microsoft JET Database Engine

Description: 'C\Program Files\{dir}\{db}' is not a valid path. Maker sure . . .

SQL Stat: 3044

Native Error: -534774783 [Database Vendor Code: -534774783]

Irrespective of the path, this error is received.

    cn = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security" & _
            " Info=False;Data Source=" & App.Path & "\school.mdb"

which is in the calling form and the path to the db is also set in the CR form as the same.

Hopefully, this is progress

former_member183750
Active Contributor
0 Kudos

OK. So you are on a 64 bit OS, using MS Access(?), CR XI R2 - 32 bit.

What version of MS Access? 32 or 64 bit?

Confirm that you are using native connection (crdb_dao.dll) and not ODBC or OLE DB(?).

Something worth considering; as a test, install the CR XI R2 desinger on that 64 bit box and see if the designer can connect.

Ludek

Former Member
0 Kudos

Thanks for the reply.

Yes, 64 bit OS with 32 bit MS Access database using an ADO jet connection.

installed crxir2 sp6 on the 64 bit OS and had data using the same connection. I set up one report (.dsr) with a connection using Access/Excel DAO. Same results. However, the calling form still had the connection cited above.

Why use a DAO connection than an ADO connection?

Thank you.

Kim

former_member183750
Active Contributor
0 Kudos

I suppose in a nut shell, you have 4 options to inhale the data:

1) ODBC (crdb_odbc.dll)

2) OLE DB (crdb_adoplus.dll)

3) Native (crdb_dao.dll)

4) ADO recordset (crdb_ado.dll)

So, with ADO you'd need to build your own record set and pass that to the report. In this way, the report would not be aware of the database. A drawback here is that the report would have to be built off of one table or view or SP as ADO recordsets are essentially one table flat file equivalents.

Do you think you'll be able to install the CR designer on that computer?

Ludek

Former Member
0 Kudos

Thanks for the response. When using vb6 and cr9 that is how the info was presented. It was not until it was discovered that reports could not be read on a 64 bit OS that has caused this intervention and step up to CR XI 2 sp6 (according to Lee Smith at SAP) to solve the problem. However, because of these changes many problems follow.

Right now I would like to see if this will work on a 64 bit OS. And since the response on the OS is the same irrespective of the connection, seems like the existing connection with ADO would be the shortest route to the water fountain.

If it is possible to cure, then other difficulties will be addressed.

Any ideas on how to?

Thank you.

Kim

Edited by: homebrewer on Aug 26, 2010 3:46 AM

former_member183750
Active Contributor
0 Kudos

The code below is a sample of what should work. It's a long, long time since I've done any VB work...

Dim Report As New CrystalReport1
Dim ADOrs As ADODB.Recordset
Dim DBLocation As String

Dim Report As New CrystalReport1 ' This will depend on how you work with the reports. This is for a DSR

'Show the common dialog to select the sample database
CommonDialog1.ShowOpen

'binds the ADO recordset object to ADO recordset variables
Set ADOrs = CreateObject("adodb.recordset")

'sets cursor location for recordset
'the CursorLocation, CursorType and LockType in this sample are the recommeneded
'choices when working with the Crystal Reports active data driver.
ADOrs.CursorLocation = adUseClient

'open the recordset
ADOrs.Open "select * from customer", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & CommonDialog1.FileName & ";Persist Security Info=False", adOpenDynamic, adLockBatchOptimistic

'add the ADO recordset to the report
Report.Database.AddADOCommand ADOrs.ActiveConnection, ADOrs.ActiveCommand

CRViewer1.ReportSource = Report
CRViewer1.ViewReport

Ludek

Former Member
0 Kudos

Ludek,

Thanks for the reply. I tried your version which is not too dissimilar to mine and got the same reply.


Private Sub Form_Load()
	Dim cn As New ADODB.Connection
	Dim rs As New ADODB.Recordset
	Dim Report As New crPayments
    Dim sSql As String
	Screen.MousePointer = vbHourglass
    If cn.State = adStateOpen Then cn.Close

    cn = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security" & _
            " Info=False;Data Source=" & App.Path & "\" & DataBaseName
    cn.Open
         sSql = "SELECT LastName & ', ' & Firstname AS Name, Attending.NumAttend," & _
         " Attending.MealAmount, Attending.MomentosNumber, Attending.MomentosAmount, Attending.CDAmount, " & _
         " Attending.CDqty, Eventname, EventAmount, EventNum," & _
         " [MealAmount]+[MomentosAmount]+[EventAmount]+cdAmount AS Totals," & _
         " Attending.Attending, Attending.Momento, Attending.ClassCD" & _
         " FROM Members INNER JOIN Attending ON Members.ID = Attending.ID" & _
         " WHERE Attending.NumAttend>0 OR Attending.MomentosNumber>0" & _
         " OR EventNum>0 OR Attending.CDqty>0" & _
         " ORDER BY Lastname, Firstname"
    
    If rs.State = adStateOpen Then rs.Close
    rs.Open sSql, cn, adOpenForwardOnly, adLockReadOnly
    crPayments.DiscardSavedData
    crPayments.Database.SetDataSource rs, 3
    crPayments.ReadRecords
    With CRViewer1
        .Refresh
        .ReportSource = Report
        .ViewReport
        .Zoom (100)
        .EnableExportButton = True
        .DisplayTabs = False
        .EnableGroupTree = False
        .EnableCloseButton = False
    End With
    Screen.MousePointer = vbDefault
End Sub

It appears the biggest difference is in the cursor handling. At any rate, I installed vb6 on the 64 bit machine and tried to debug.

That exercise was fraught with missing components since the OS is a bare testing machine. i.e. could not install Office 2007 for some reason.

I am at a loss.

Kim

former_member183750
Active Contributor
0 Kudos

I think we're at a point where creating a phone case will be a good idea. Phone cases can be obtained here:

http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100?resid=S6I@hgoHAkEAAGsiyV...

Ludek

Former Member
0 Kudos

Ludek,

Many thanx for your efforts and help. Unfortunately, my budget will not allow for a $195 phone call. Particularly when the software appears to be on promo for about $40 more for an upgrade. But that does me no good if the program does not work for me.

Do you think it could be the OS? Which is an OEM copy.

Thank you.

Kim

former_member183750
Active Contributor
0 Kudos

Could be. An easy way to check that would be to download the 30 day eval from here:

http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx

I would like you to throw Service Pack 3 on it, just to make sure and see how that does:

https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe

The SP 3 msm is here:

https://smpdl.sap-ag.de/~sapidp/012002523100007123582010E/cr2008sp3_mm.zip

and the msi is here:

https://smpdl.sap-ag.de/~sapidp/012002523100007123592010E/cr2008sp3_redist.zip

I'll also get someone else to take a peek at this before you have to shell out the $$

Ludek

Edited by: Ludek Uher on Aug 30, 2010 6:23 AM

Former Member
0 Kudos

Ludek,

Many thanks for the reply and help.

The version I am working with is the stand alone CR XI R2 SP6. And am using it with VB6 to fix a legacy problem. The first link is for the same version, so it seems. However, the other three links are for CR2008 to be used with VS2008?

Thanks for the offer to have someone look at this.

Kim

former_member183750
Active Contributor
0 Kudos

Darn. Apologies. CR 2008 will do us no good as the RDC is retired there. Just hag on. I've alreay sent a message to a co-worker to see if I missed something here...

Ludek

0 Kudos

Hi Kim,

A few notes. Use your CR XI Keycode on CR XI R2 and it will work, no extra costs.

As for using native DAO on 64 bit Microsoft doesn't have a 64 bit version of the native JET driver. Only option is to use OLE DB or ODBC.

When you create the DSN make sure you use the ODBC Administrator from the Control Panel, it will be the 64 bit version. The one located in \windows\syswow64 is the 32 bit version.

Thank you

Don

Former Member
0 Kudos

Don,

Many thanks for your reply. I have entered the keycode not only when CR XI R2 was installed but also put it into the license.msm.

I am using OLE DB and not ODBC and am having difficulty finding the ODBC Administrator you mention. Must be something I missed. The steps used for the DSN are:

1. Right click in Explorer panel of VB6 and click Add Crystal Reports 11.5

2. Use the Wizard or Click blank

3. Right click on Database fields and choose Database Expert

4. Click on OLE DB (ADO) and click add command.

Can't find the 32/64 bit version you mention. The same is true when in the standalone CR XI R2 version. What am I doing that needs changing?

Thank you.

0 Kudos

Hi Kim,

I think it's VB6 that is causing all of the issues.... I did a search on VB6 and Windows 7 and found this MS kbase article:

http://msdn.microsoft.com/en-us/vbasic/ms788708.aspx

It lists the VB 6 IDE is not supported in 64 bit: About the 3rd of the page down...

One would think that because you are running VB6 it's a 32 bit app, so all of windows resources should also be loading only 32 bit but it may be a problem with VB6 and windows 7 and database access.

As for OLE DB or ODBC I would think OLE DB would work... but.

If you don't find odbcad32.exe in C:\WINDOWS\SysWOW64 then you don't have MDAC or WDAC installed and not sure what VB 6 is using to connect. Possibly VB 6 installed some data components and the IDE is using it rather than the MDAC drivers.

All I can suggest now is you upgrade to .NET and use the Windows and CR .NET Assemblies. It's the only way your app will continue to work with new operating systems....

Thank you

Don

Former Member
0 Kudos

Don,

Not only is it a VB6 problem (need to use for legacy) but also an OS' one since Vista. Has nothing to do with Crystal Reports. But that doesn't mean I am not going to hit you up for a super duper discount.

Here is what I found out: From Vista forward files that will be modified must be placed into another directory than C:\Program Files\{app dir}\app file. To overcome this problem, I changed the data location for All CR files to C:\ProgramData\{app data dir}\db. And voila! everything comes up roses. All reports perform as they should in OS7 Ultimate 64 bit. Next is to change the directory for the database also. I gleaned this info from another forum.

Many thanks to you and Ludek for your help and support. I appreciate your time, patience and efforts to help resolve this problem. Stop in for a homebrew.

Now about that discount. . . . .

Kim

0 Kudos

Thank you for posting your work around.

Don

Former Member
0 Kudos

Don,

Yesterday I thought it was an OS problem. Today I don't think that is quite accurate. Let me explain.

After setting the data source path on all reports, it occurred to me that the data entry portion of the problem works as intended irrespective of the db location. The reports started playing nice only when the db file was removed from C:\program files directory.

Next I decided to go back to vb6 and cr9. Created the setup package and opened OS7 Ultimate and cleaned out all incidences of both VB6 and Crystal Reports. Installed the program. This time whenever any report was called 'run time error 50003' showed up and the program closed.

I could find nothing definitive on the Internet to resolve this situation even though it seems that 50% of the programmers on each continent has incurred the wrath of 50003. So, this time when creating the setup package I not only included the CR9 deployment files but also the CR XI R2 msm's. Solved the problem. Not only on my test OS but also on a non related OS 7 64 bit machine. Seems that there is a magic genie in CR msm's that triggers the 64 bit OS to play nice.

At any rate, the data entry and data reports are now both working. Seems that I should hurry over to .net and upgrade this thing soon.

Thanks again for your assistance.

Kim

Former Member
0 Kudos

Ludek,

Thanks for the info. I am using CR XI2 sp6 version 11.5.11.1470. It is a trial version until I work out some of the conversions for my legacy problems. Or until the trial period expires.

Kim

former_member183750
Active Contributor
0 Kudos

Hello Kim:

OK, good. So it is with CR XI R2 and SP 6 that you are geting the vendor code error? If that is the case, you will have to first consult your database documentation and find out what that error means. the CR engine is essentially passing through the database error without any massaging of the message. Perhaps once we know what the error actually is, we can troubleshoot this further.

Ludek

Former Member
0 Kudos

Thanks for the reply.

The OS is Windows 7 Ultimate, 64 bit. Database is Access and the connection is OLE DB (ADO). I am not familiar with vendor numbers. Where do I find that?

What do you mean that you doubt if it will work on a 64 bit system?

Kim

former_member183750
Active Contributor
0 Kudos

I should have been more clear on the 64 bit statement. Only certain versions of CR support particular Operating Systems. I was pretty sure that any 64 bit OS will not be supported by CR XI (it's not the 32 / 64 bit, it's the OS). Anyhow, see [this|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=56787567] wiki. It describes which version s of CR support which OS. If you are using CR XI Release 1, you will have to upgrade to CR XI release 2 with SP 6 on top of that. Let me know if you are on CR XI R1 and I'll send you instructions on how to move up to CR XI R2.

Ludek