|
-
Aug 27th, 2010, 04:40 PM
#1
Thread Starter
Member
vb6 & crxi r2 sp6
Tried to install a vb6 using cr9 on a 64 bit OS and the program crashed whenever any report was selected. Program worked as it should when a report not selected.
Crystal Reports msms are used for the install. The key has been entered in the license msm.
The code used to call the .dsr is
HTML Code:
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
The error msg is:
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
The error msg is the same irrespective of the path.
Any ideas would be great.
Thank you.
-
Aug 30th, 2010, 07:54 PM
#2
Re: vb6 & crxi r2 sp6
Not sure this is a 64 bit problem. It may be an OS problem. May need to move your database to another location, not "program files". Need to teel us what OS your using and what line of code is causing the problem. You might have better luck if you post this in the VB6 Forum or the Application Deployment Forum. I don't think is a CR problem.
-
Aug 30th, 2010, 08:35 PM
#3
Thread Starter
Member
Re: vb6 & crxi r2 sp6
About 10 words into the first line clearly states the OS. Why would location of db affect the program? What do you have to substantiate that? And lastly why to think it is not a cr problem when the program runs the way intended until any CR report is called? What makes you say it is a OS problem?
Thank you.
-
Aug 31st, 2010, 01:00 PM
#4
Re: vb6 & crxi r2 sp6
I have no idea what your OS is so it's only a guess. From Vista forward your not supose to put files that are going to be modified under "program files". There's lots of info on this in the VB6 forum, heres one link
http://www.vbforums.com/showthread.p...ccess+database
-
Aug 31st, 2010, 02:01 PM
#5
Thread Starter
Member
Re: vb6 & crxi r2 sp6
Thanks for the response. Your right, no way to tell. OS is 64 bit OS7 Ultimate.
If not putting the files in c:\program files\ for those to be modified then it appears to me that Microsoft is violating vista 101 since that is exactly where vs2008 places them along with the help, executable and config files. Wonder why?
Now onto the last part of your reasoning that it is not a Crystal problem but an OS problem. Because of Vista 101? Isn't that a quantum leap?
-
Aug 31st, 2010, 03:06 PM
#6
Thread Starter
Member
Re: vb6 & crxi r2 sp6
I tested your theory wesdbt and it is right on target. Thank you for your help and patience. Changed the directory for the crystal reports database and now they work. Next, change all references to the new location.
Really appreciate your help. Stop in for a homebrew.
-
Sep 1st, 2010, 04:45 PM
#7
Thread Starter
Member
Re: vb6 & crxi r2 sp6
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|