HomeProducts | Services | Samples DownloadsOrder Support FAQs  Contact Us |   Links
   

 Access Whiz - Microsoft Access to .NET/Crystal Reports/VB6 Converters


Technical Support Page
 

 

 
  General 

- 1. What's new in the latest update?

 

A: The latested Access Whiz setup was dated on 6/30/2024.


- 2. What are the converters that you have in your product lines?

 

A: Access Whiz Options: 

 

 A- MS Access to VB .NET (Web Applications) converter: ANETVB

 B- MS Access to VB .NET (Windows-based Applications) converter: ANETVB85

 C- MS Access to VB6 (Windows-based Application) converter: AccessToVB6

 D- MS Access to C# (Web Applications) converter:  ANETVC

 E- MS Access to Crystal Reports 8/8.5/9/10/11/11.5 converter: AccessToCR

 F- MS Access Form Controls to VB .NET converter: ANETVBF

 G- MS Access Form Controls to C# .NET converter: ANETVCF

 H- MS Access to C# .NET (Windows-based Applications) converter: ANETVC85   

 


Access Whiz 32bit

Access Whiz 64bit

- 3. How can I convert my Access database into an executable file? 

 

A: Our Access Whiz tools can help to convert your Access database into an executable file. You need to convert your forms, reports and modules to a VB 6, VB .NET or C# project and then build the converted project into an executable file. 

 

Sample converted vb6 download (39 files are included in this self-extracted file and total conversion time for 21 northwind forms was 8 seconds; file size:928KB) 

Sample compiled VB .NET reports DEMO for .NET 2.0 or later  (13 files are included in this self-extracted file; file size:812KB) 

Sample Windows-based Smart Client-web service Application (VB .NET 2003 project in a self-extracted file, file size:1.27 MB)

Sample Windows-based Smart Client-web service Application (VB .NET 2005 project in a self-extracted file, file size:1.23 MB)

Sample converted vb2005 download (119 files are included in this self-extracted file, file size:2.60 MB)


Back to Top


 Evaluation 

- 1. How can I evaluate your converters?

 

A: The trial demo downloads and the update patch are available on our download page.  Most of our converters except the programs vba2vbnet, vba2cs and AccessToCR  are limited to the included Northwind.mdb when they are in trial mode.

If you are new to ASP .NET web development you can setup your Windows System as a IIS web server and download Microsoft Visual Studio Community. 


- 2. I am not allowed to install your trial setups onto my company's computer. Is there a way that I can still evaluate your tools?

 

A: Yes, for Windows 2000 and XP Systems you can just download the update patch from our download page. All of the trial demo converters will be available in  your c:\program files\acc2net85 folder once you run this self-extracted file.  From there, you will be able to evaluate any of our converters. When you run our tools you may get the error: Component 'comdlg32.ocx'/'tabctl32.ocx' or one of its dependencies not correctly registered: a file is missing or invalid. You will need to copy the files comdlg32.ocx and tabctl32.ocx from c:\program files\acc2net85\ to your system folder \WINNT\system32\ or \Windows\system32\. You need to manually register these two component files. After you finish the evaluation you can just delete three folders (i.e. c:\program files\acc2net85, c:\inetpub\wwwroot\northwind and the c:\northwind). Note: the tools may work on the Vista and Windows 7 systems that already have the required dll/ocx files installed. On a Vista/Windows 7 systems you need to register the required tabctl32.ocx and comdlg32.ocx. 

 

Type cmd in the Start Search box above the Start Orb and then hit Ctrl+Shift +Enter. You will be prompted with the obnoxious User Account Control dialog. It will open up a command prompt in Administrator mode after you click the continue button. Enter the command cd c:\program files\acc2net85\ and run the batch command file vistafix.bat which includes the commands regsvr32 /s tabctl32.ocx and regsvr32 /s comdlg32.ocx. 

 

You can also right click on the links "regsvr32 -tabctl32.ocx - c drive" and "regsvr32 - comdlg32.ocx - c drive" of c:\program files\acc2net85\  and click "Run as administrator" option if c drive is your system drive.

 


- 3. What software do I need in order to use your converters?

 

A: For form conversions you need to have Microsoft Access 2000 or later. For Access to CR report conversions you need to have Crystal Reports RDC 8 or later with RCAPI license. For Crystal Reports to Access report converter you need to have RDC 8 or later only.  To convert Access To .NET you need to have .NET Framework SDK 1.x or 2.0 installed. To view the converted ASP .Net web forms you will need to set up an ASP .NET web server. To view the converted reports on the web you need to have Crystal Reports ActiveX report viewer. 

Back to Top


- 4. Do you have sample demo or trial demo for non-English language Windows and Access?

 

A: Yes.  Currently, there are German, Chinese and Japanese versions that are non-English. Please email support@microtools.us if you have any questions or specific requests.

 


- 5. The required MS Access 2000/2002/2003/2007/2010 was not found or not a default! What does it mean?

 

A: You need to have Access 2000/2002/2003/2007/2010 as the default Microsoft Windows' Access application.  You can change the file associations for the mdb file to the msaccess.exe of your Access 2000-2019. 

 

Try this if the above solution does not work for you. Dow load the latest update patch. If you have both Access 97 and Access 2000/2002/2003/2007/2010 installed on your computer, you will need to edit the file program files\acc2net85\msaccess.txt and specify the location of your Access 2000/2002/2003/2007/2010 executable. You need to create the msaccess.txt if you cannot locate it on your system. 

 

Back to Top
- 6. The trial version software gives me the error number 90B(1|1) or 85B(1|1). How can I fix it?

 

A: Our current trial demo programs are limited to the included sample, Northwind.mdb. The converter could not open the included Northwind.mdb with your Access correctly. You may need to upgrade your Access if you are using Access 97. The converter could also produce this error if you got the prompt to enable/disable macros and you selected to disable macros. You may need to run the MS Workgroup Administrator program and change the workgroup to the default system.mdw if you are getting the
error 90B(0|0) or 85B(0|0).

 

- 7. When I ran the trial demo I got the message 'northwind.mdb not found!'  How can I fix this problem?

 

A: The program folder, acc2net85, needs to be under the folder “Program Files” (or “programme” or “Archivos de programa” or "Program Files (x86)") folder. The folder name can be found on the middle of the left hand side of the Trial Demo main screen.  Try creating a subfolder called  acc2net85 and copy all the files in your installed folder into this new folder. If you are still getting the same error message, you will need to create a text file, c:\acc2net85.txt, and specify the path of your acc2net85  folder in this text file. 


- 8. The converter converted the northwind forms but no reports. What should I do?

 

A: Our report converter uses the Crystal Reports RDC API calls. In order to convert Access reports, you will need to have RDC which comes with one of the Crystal Reports 8/8.5/9/11 Developer and 10 Advanced Developer editions.   Note: for Crystal Reports 9 Developer/Advanced Edition, you also need to purchase additional RCAPI license. Now the ANETVB8 provides you a way to preview or print your Access reports. Our  update patch also includes testaccessreports.exe which is a self-extracted file and includes a  sample web form to use Access DoCmd.OutputTo to generate htm files.


- 9. What's in your Access Pre-Conversion Tool?

 

A: Our Access Pre-Conversion Tool has six options. The summary report can give you ideas about your Access files and help you to do the conversion job estimation.  Access files store the control information based on the sequence of control creation. The converted controls may not be in maintainable order. One can use our tool to internally sort the Access controls by their top-left position on the form. Our converters can only convert bmp images and copy the non-bmp image files from their original location. If one moves the Access file to other locations the original image files may be missing.  One of the options can restore your original non-bmp files from your Access form and report images. The other options will help your conversion also. You can find this program in our update patch. It includes with any of your Access Whiz Options A - H orders after March 2006.


- 10. The key code program that I received could not turn my trial demo into the production mode. What should I do?

 

A: Check the product serial number and send us the correct one if you mistyped it on the order form. Below the product serial number on the main screen you can find a program folder name (e.g. c:\program files\acc2net85). You need to extract the key code information into that program folder. Please email the screenshot of the main screen of the converter and directory listing of that folder to support@microtools.us if you still cannot turn your converter from the trial mode into the production mode.

 

Back to Top
- 11. After I selected an Access file to convert the program hung and used up 100% CPU or displayed the following message: Microsoft Access can't open the database because it is missing, or opened exclusively by another user.

 

A: Close the database if it was opened in Design mode.  The database that you selected may have been created with a later version of Microsoft Access than the one running. Try upgrading your version of Access and then converting the database to the new one.  If you are currently using Access 2000, you cannot convert or import an Access file that created by Access 2002. You need to upgrade yours to Access 2002 or 2003.  Keep the number of records in the Access tables to minimum and use Windows Task Manager to end all the running Access Processes if 100% CPU occurred. 


- 12. When I tried to install your trial demo I got the "Setup cannot continue because some system files are out of date on your system" or "The destination file msvcrt.dll in use".

 

A: Installing .NET Framework SDK first may resolve this issue.  We used Visual Basic 6.0 for our setup program and Microsoft ActiveX Data Objects 2.7 Library is  required. The .NET Framework/NET Framework SDK may include the latest version of Mdac_Typ.exe.  You can install the download mdac_typ.exe from our website.  Also, try reading the Microsoft support page at  http://support.microsoft.com/support/kb/articles/Q191/0/96.ASP. You can cancel the setup and run one of our programs in your "c:\program files\acc2net85" folder. The incomplete setup may not install all required dll files. If there is any dll file missing when you run the converter. You can find it in the cab file in your "c:\temp". Unzip it from the cab file to "c:\program files\acc2net85" folder and then use regsvr32 command to register that dll file. Please click "Ignore" button if you see the messages below during the converter setup and also click "Yes" to ignore the error.

 

 

 


- 13. How can I test the trial demo for my local back-end SQL Server?

 

A: If your SQL server has the northwind database, our converter can generate web forms with the SQL Server connection string.  However if your SQL Server does not have northwind database and our converter does not port your tables to your SQL Server, then you will need to use Access Upsizing Wizard to upload the tables and queries to SQL Server.   For more information about Upsizing Tool, see http://support.microsoft.com/?kbid=294407, http://support.microsoft.com/kb/241743/EN-US/ and http://www.aspfaq.com/show.asp?id=2182 Before you click the Convert button, you can select OleDB-SQL Server as your target data source and fill in the connection information.  The converter will use the information from Northwind.mdb to generate the web forms but the connection  string will be the OleDB -SQL Server connection previously selected. You can just test this on one of the northwind sample forms and see the difference between the connection string for Access and SQL Server. 

The generated connection strings will appear as follows:
 
For Access data in VB: databasespec="Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\northwind\northwind.mdb;Password=;User ID=Admin"
          
For my local SQL Server: databasespec="Provider=sqloledb;Data Source=(local);Initial Catalog=northwind;User Id=;Password=;Integrated Security=SSPI"

You need to specify the User ID and Password if they are required by your SQL Server. You may receive an error message like "Exception2[Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.]". 

The converted ASPX web forms accessing the northwind database that comes with the SQL installer should work fine once you specify the required User ID and password. If you still have the problem, you may need to change your security settings in your SQL Server. 

Please check out this link, http://www.banmanpro.com/support/sql2k.asp.

Some useful information about data connections can also be found at http://www.carlprothman.net/Default.aspx?tabid=81.

 

Back to Top


- 14. How can I fix the Run-time error '13': type mismatch?

 

A: You may need to add English (United States) language to your Regional Options which is one of the applets under your Windows Control Panel if you are using a non-English version of Windows.


- 15. How can I test your converter when I received a Microsoft error or Run-time error '53':File Not Found?

 

A: These errors most likely occurred on a Windows XP Home Edition with Access 2002. Please download and install our latest update patch. Contact our tech support if you still receive the error.  If you are using VB statement like 'Dim app As New Access.Application' in your code and getting one of the errors you will need to change to 'Dim app As Object' and 'Set app = CreateObject("Access.Application")'. You may need to repair your Access installation.

 

-16. What should I check when the converter hangs during the conversion?

 

A: Normally it takes 1 to 30 seconds to convert one form or report. If the convert uses 100% CPU you can use the Windows Task Manager to stop the converter and end all the MSACCESS.EXE processes. If there were multiple Access processes running and the converter hung you can select less forms or reports to convert and find out the form or report that causes the problem. If no Access process was running you need to check your Access file and make sure your Access forms or reports are running correctly. Turn off the startup form, autoexec macro or any password protection. It happens on some of the Access 2007 systems. If the converter hangs even you select the file c:\northwind\northwind.mdb. You will need to install an early version of Access (i.e. 2000, 2002 or 2003) to resolve the problem. If the converter works for the file c:\northwind\northwind.mdb and some of your Access files you need to check your Access file. Your Access file may be corrupted.

 

-17. How can I fix the Run-time error '70': Permission Denied?

 

A: Your computer may not have the necessary registry information for the class "Access.Application". Please run regedit to search Access.Application class. If it's missing you may need to repair your Access. If you are running our converters on a Vista or Windows 7/8 system you need to run them as Administrator. 

 

-18. How can I fix the Run-time error '76':  Path not found or '75': Path/File access error?

 

A: Try our latest update patch first. One of the required dll or tlb files may be missing or installed incorrectly. If the file msado27.tlb is missing on your computer you can install the download mdac_typ.exe from our website. If you are running ANETVB, ANETVC, ANETVBF or ANETVCF on a Vista you may get the Run-time error '75' Path/File access error. You will need to manually create the output folder c:\inetpub\wwwroot\northwind before you run these programs. If you are running our converters on a Vista or Windows 7/8 system you need to run them as Administrator. 

 

-19. Can I evaluate your AccessToCR with a copy of CR XI Developer Edition or a copy of full version of craxdrt.dll? 

 

A: Yes, you can. You need to have AccessToCR v3.11.1009 or later if you are using CR XI Release 2. If you don't have AccessToCR v3.11.1009 or later please install our latest update patch. If you have a copy of full version of craxdrt.dll you need to run regsvr32.exe to register the file. Note: you will get only partial converted reports if you only have the craxdrt.dll that came with your Standard/Professional Edition of Crystal Reports. Your converted reports will not contain any database fields. Make sure you have the latest Service Pack of Crystal Reports XI Release 2 and the latest version of AccessToCR installed.

 

-20. I could not finish ANETVB8 setup and got the Run-time error '52': Bad file name or numbers. What can I do? 

 

A: You can do the following steps to correct the problem:

a. Download and install our update patch. 

b. Run the program c:\program files\acc2net85\ANETVB8.EXE. It may show you one of the dll or ocx files is missing. 

c. Copy the missing dll/ocx file from c:\temp\anetvb8.cab to your c:\program files\acc2net85 folder and run regsvr32.exe "c:\program files\acc2net85\xxxx" where xxxx is the missing filename. 

d. Repeat steps b and c until all the necessary dll/ocx files are found and registered.

 

-21. I am getting the Run-time error '-2147219502(800407d2)': Registry data not a string from most Access Whiz converters on my Vista. How can I fix this error? 

 

A: Please download and install our latest update patch.

 

-22. I am getting the Run-time error'-2147024770(8007007e)': "Automation error. The specified module could not be found." from most Access Whiz converters. How can I fix this error? 

 

A: Your scrrun.dll may be registered incorrectly. Please run regsvr32.exe "c:\xxx\system32\scrrun.dll" where xxx is winnt for Windows 2000 and windows for Windows XP. 

 

-23. I got some unreadable/non-English characters on the Data Connection dialog. How can I fix the problem? 

 

A: The ANETVB, ANETVB8, ANETVC and AccessToCR setups may contain an incorrect version of oledb32.dll and oledb32r.dll. You will need to download and reinstall one of these setups from the section I of our download page. Note: the update patch will not correct the dll problem.

 

- 24. I have VS 2002, VS 2003 and VS 2005 installed on my system and Access Whiz converters show (2002) on the main screen. How can I switch to another version of VS? 

 

A: You locate the xsd.exe in your .NET Framework SDK 1.0 folder and rename that file to xsd1.exe. Rename back to xsd.exe when you need to use VS 2002.

 

- 25. I have VS 2008 installed on my system and Access Whiz converters show "No .NET Installed". What should I do?

 

A: Access Whiz converters can only generate VS 2002/2003/2005 projects. You need to download and install .NET Framework SDK 2.0 which contains the required xsd.exe.

 

- 26. I got "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine."  and "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine." messages when I ran the converted ANETVB8 northwind project on a 64 bit Windows Server. Is there a workaround?

A: You need to switch your target CPU in your application property to x86 (32 bit) because there is no 64-bit version of the OLE DB provider or ODBC driver. Change Active solution platform in Configuration Manager to x86. If you don't see the Configuration Manager option under Build in your .NET projects you need to check the Show Advanced Build Configurations option under Tools - Options - Projects and Solutions - General. 

 

If you are using Visual Studio 2008 you can take a look at the Visual Studio 2008 readme file at

  http://download.microsoft.com/download/9/a/e/9ae0f6cc-7032-408e-9ca7-989f9e4af4ec/VS2008Readme.htm

 

- 27. I got "The procedure entry point lstrcatI could not be located in the dynamic link library MSDART.DLL." when I ran the Access Whiz setup. What can I do?

 

A: You may have an incorrect version of MSDART.DLL. You can install the download mdac_typ.exe from our website. You can also find a copy of MSDART.DLL (version 2.81.1117.0) in your acc2net85 folder if you have downloaded our latest update patch. You need to run the batch command regsvr32.exe "c:\program files\acc2net85\msdart.dll" to register the file msdart.dll. 

 

- 28. Do you have any time-limited or function-limited trial version of your products so I can try them on my database?

 

A: No, we don't have such version of the products except our report converter and the code converters which allow you to preview some conversion results. We recognize that most of our trial demos are limited to the included northwind and ordering any product on the web requires trust. We do offer limited 14-day money back guarantee which is intended to allow to examine our products without financial risk. It is not intended as a free "rental" program or a free evaluation tool for your large conversion projects. We have been very pleased with our many repeat customers, very low product returns and our 100% no charge back record. If you are not sure that you wish to keep your license, please read our order page for the limited guarantee details and do some simple math getting a realistic job estimate before you place your order. Do not acquire our products if you do not agree to our return policy.

 

 

- 29. Do you have any quick way to get a conversion project estimate? 

 

A: Here are two quick dirty formulas we came up and you can change them  to fit your needs: 

 

A. project estimate = P(f,m,n,h,r,v,e,t) = (f/m + n/h) * r * (1.0+v/100.0) * (1.0-c/100.00) + t

where 
f = total number of controls in forms and reports
m = total number of controls per hour to convert
n = total number of lines in modules and in-form
h = total number of lines per hour to convert
c = expected conversion rate with any conversion tool (%)
t = $ for conversion tools
v = overhead (%) including debug time and others
r = $ per hour

For examples:

P1 = (50000/60 + 180,000/180) * $60 * (1.0 + 50.0/100.00) = $165,000   (without using any tool)

with tool:
P2 = (50000/60 + 180,000/180) * $60 * (1.0 + 50.0/100.00) * (1.0 - 95.00/100.00) + $150 = $8,400   if c=95%
P3 = (50000/60 + 180,000/180) * $60 * (1.0 + 50.0/100.00) * (1.0 - 80.00/100.00) + $150 = $33,150 if c=80%

 

B. project estimate = between T/40 and T/15       with conversion and upgrade tools

where T= total development cost of your Access project

 

 

Please email us if you have any better formulas or references. We will post here for you.

 

- 30. I am getting "c:\northwind\northwind.mdb Not Found" error when I run your trial demos on a Vista. How can I fix that problem? 

 

A: In order to run our tools on a Vista correctly the login account needs to have Administration permission to create a new folder on your C: or you can manually create the folder c:\northwind.

 

-31. When I ran the converter on the northwind sample the Picture and ProductList controls of the Categories form were blank. How can I fix that problem? 

 

A: Please download our latest Access Whiz setup if you are using the ANETVB version earlier than 2.12.0401. 

 

- 32. I got the "HTTP Error 404.4 - Not Found" error when I tried the urls http://localhost/ and http://localhost/anetvb_northwind/ on my Vista system. How can I fix this error?

 

 

A: If you are using a Vista Home Premium or Ultimate you need to turn your IIS on by clicking the "Programs and features" icon on your Control Panel and then click the "Turn Windows features on or off" option. Check the IIS items and click the OK button. Your IIS web server should be ready in a few minutes.

 

 

You cannot use a Vista Home Basic system as your web server. The url http://localhost/ will not work even you turn on IIS because it does not have the required features for a web server as the other editions. 

 

 

To test your ASP .NET pages on a Vista Home Basic system you need at least to have Microsoft Visual Web Developer 2008 Express Edition. Open your web site with VS 2002, 2003, 2008 or VWD 2008, build your website and then start Without Debugging. You will be able to view your web pages.

 

-33. I am having problem to activate my Access Whiz license key on my 64-bit Windows 2008. What should I do? 

 

A:  Please run the converter and check the program folder name shown on the main screen above the version number. Make sure that your license key code files are extracted into the same folder. Note: the folder can be c:\program files\acc2net85 if you just installed the update patch and can be c:\program files (x64)\acc2net85 if you did run the Access Whiz setup program.

- 34. Where can I download the setup program for the Access Whiz Option H: ANETVC7? 

 

A:  There is no setup program for the program ANETVC7. You just need to download our update patch and the program ANETVC7.EXE can be found in your acc2net85 folder. If you are using a Vista system you need to download and install the ANETVC setup from the section I of our download page and the update patch from the section II of our download page.

 

- 35. I am trying to view the converted northwind website and getting HTTP ERROR 404.3 - Not Found Server Error in Application "DEFAULT WEB SITE". How can fix the error? 

 

A:  Make sure IIS is running on your server. If you are using IIS7 you need to open Programs and Features -> Turn Windows features on or off on your Control Panel and enable all Application Development Features under Internet Information Services > World Wide Web Services.

 

- 36. VS 2008 and VS 2010 cannot recognize the xsd files in VS 2005 projects. What do I need to do to fix the dataset problems? 

 

A:  You need to remove the first line of VS 2005 xsd files that contain the line <?xml version="1.0" encoding="utf-8" ?>. You can delete them manually or run the batch command file toxsd2008.bat in the datasets subfolder.

 

- 37. What should I do with "Failed to load control 'CRViewer' from crviewer.dll. Your version of crviewer.dll may be outdated. Make sure you are using the version of the control that was provided with your application." error message when I ran AccessToCR Previewer? 

 

A:  If you are using Crystal Reports 8.5 you can use regsvr32.exe to register the file crviewer.dll (i.e. version 8.6.1.758) in your Access Whiz acc2net85 program folder or install the Crystal Reports 8.5 Service Pack 3.  For Crystal Reports 11.5 you should have the Service Pack 2 Full Build or later. Here is a list of some SAP download links for CR XI:  CR XI R1 SP3 11.0.0.2269, CR XI R1 SP4 11.0.0.2495 
, CR XI R2 SP3 11.5.9.1076 and CR XI R2A SP6 11.5.12.1838.

- 38. I got "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine." and/or "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine." messages when I tried http://localhost/northiwnd/customers.aspx on a 64 bit web server. What can I do? 

 

A: Open IIS Manager, click the Application Pools and right click on each Application Pool, select Advanced Settings, set “Enable 32-bit Applications” to True.

 

- 39. I got "The Microsoft Office Access database engine cannot open or write to the file ''. It is already opened exclusively by another user, or you need permission to view and write its data." How can I fix this problem? 

 

A: The user account your web application is configured to run under will require permissions to the folder(s) where the Access database file and the system database file are located. 

 

 

Back to Top

 

 

 

Support 

 

- 1. I recently purchased one of your tools and I understand that your tool is sold on an as is basis. Can you still help me to improve my conversion result? 

 

A:  Yes, you can send us your file (5MB or smaller) if it contains only non-confidential information and is for bug reporting purpose only. Although our products are sold "AS-IS" and with no maintenance contracts, we can offer very limited assistance to our customers on a case-by-case basis. 

 

Please feel free to send us your bug reports as we continue striving to perfect our products. We hope to provide quarterly/monthly software updates to address your needs. We offer support on issues requiring more immediate attention. In these more urgent cases, once work is initiated, you will no longer be eligible for our money back guarantee in most cases, due to the time-intensive nature of these costly tasks. This policy is in place to allow us to continually offer the most fair and economical prices to all of our customers. 

 

Note: the article on "How to Report Bugs Effectively" at http://www.chiark.greenend.org.uk/~sgtatham/bugs.html can help you to report our software bugs effectively so we can serve you better.

 

 

 

 

Back to Top


 
Microsoft Access 

- 1. Will the tool convert queries done in Access?

 

A: No, our tools do not convert or migrate your Access queries but the third option of our AccesPreConversionTool now can generate two SQL script files createtablesoracle.sql and createviewsoracle.sql for Oracle users. You need to keep a copy of queries along with the tables in your backend database.  You need to migrate them to your database  sever as views if you are using a non-Access database as your target data source. This should be the first step of your conversion project. For migrating to SQL server the article at http://www.databasejournal.com/features/msaccess/article.php/3697256 may be useful to you.


- 2. What do I need to do before I convert my Access with link tables?

 

A: You can just run the converter and select your Access file. If you don't use the default Access target data source and your backend database is not an Access database the required queries migration should be carried out before converting your reports and/or forms. If you use the default target data source you will need to change the database connection on the converted forms or reports after you run the converter. Note: for some converted Crystal Reports you may have problems to update the database connection.

 

You can also create a new Access file and import the table definitions from the back-end data source and all the queries, forms, reports and modules from your front-end Access file. If your back-end data source is a SQL server or Oracle server, you may need to rename all the table names and remove the prefixes that the linker added.  You can convert the forms and reports in your new Access file once you remove the prefix. 

 

Here is the shortcut to create a new Access file for conversion:

Run the program AccessPreConversionTool.exe (v1.5.1001 or later) in your \acc2net85\ program folder and check the option box of "Copy Access objects to a new mdb file". It will generate a new Access file which will contain all your table structures, queries, forms, reports and modules. You can rename the file and place your input folder. Also you need to rename all the table names and remove the prefixes that the linker added. Test the reports in this new file. In order to convert the reports they have to be opened without any error. Run the converter to convert the new clean mdb file.

Before you click the Convert button for form conversion, you need to modify the connect strings so your converted web forms/reports may contain the proper connection to your server. After the conversion you will need to modify database connection if the converted reports or forms are still connect to the Access file.

 

Note: the third option of AccessPreConversionTool.exe (version 1.5.10.01 or later) can generate the output file accessqueries.txt which contains all your original Access queries in \accesstext\ folder. The script files named createviewsoracle.sql and createtablesoracle.sql may be used porting table structures/queries to your Oracle database server.

- 3. Many images in my Access forms and reports did not get to convert. What can I do?

 

A: If you move your Access files to another machines all the original image files are still in the original computer and some of your embedded images may not be able to convert. You can use the fourth option of our AccessPreConversionTool.exe to restore the Access images from your Access file to your current computer. AccessPreConversionTool.exe is included in our update patch download file. You should find it in c:\Program files\acc2net85 folder. You will need to rerun the converter after you restore the image files. 
Back to Top

 

- 4. Can your converters handle non-English version of Access files?

 

A: Yes, our converters can handle many different versions of non-English Access files. To make sure the converters work with your version of Access you can send us your version of northwind.mdb or any small sample file with the following form and report design. We will modify the converters to handle your version of Access correctly.

 

- 5. After I convert my forms it says it converts okay.  When I open the html, it comes up with the database name and a drop down of forms. I cannot select any form.

 

A: Something might be missing in your Access file.  Please open your Access file and test the forms.  You also need to change the MS Access workgroup to the system default if you are using a workgroup security.  Contact our tech support, if your Access forms work OK but the converter still does not produce any ASPX file.

 

-6. How can I convert my Access 2007/2010 files since your converters were designed for Access 2000-2003 files?

 

A:  Before you start the conversion you should export all the objects of your Access 2007 files to Access 2000-2003 files to make them Access 2000-2003 compatible. All of our converters were developed prior 2007 and can only convert the features in mdb files. Although some of them can accept .accdb files as input but they cannot convert any new features in Access 2007 or 2010. You can save your .accdb file in a .mdb file before you use any of our converters. Please read the article on "Save an Access 2010 database in an earlier file format" at http://office.microsoft.com/en-us/access-help/save-an-access-2010-database-in-an-earlier-file-format-HA010341553.aspx.

 

- 7. The converter hung when I converted my Access Data Project and it consumed 75% to 100% of my CPU. What should I do?

 

A:  Please use to Windows Task Manager to stop the converter and all the Access processes. When there are more one Access processes are running it will use up 100% CPU and the program will hung. You can try the following steps:

a. Use Windows Task Manager to end the converter and all the MSACCESS.EXE processes.

b. Check your Access forms/reports and make sure that they are working correctly in Access.
c. Remove password if any of your VBA modules is password protected. 

d. Remove any commas you use in your form/report names. 

e. Select few of your forms/reports to convert. You don't need to convert all the forms/reports at one run.

f. Use the program adptomdb to export your ADP objects to a mdb file and convert the mdb file if the above steps cannot fix the problem.

 

-8. Can your converters handle Access Data Projects?

 

A:  yes, in order to get the best conversion results we recommend you to convert your Access Data Projects to mdb files. Now we offer the adptomdb program that can convert adp files to mdb files. This tool can retrieve the table and view definition information from your SQL server. Make sure that your adp file is connected to your SQL server and the connection information on the sql server tab is correctly provided while you are using the adptomdb program.  The adptomdb tool only converts those tables and views created by the dbo user or the user has the VIEW DEFINITION permission. You can open your tables and queries of your adp file in design view to verify the connection and permission. You can also use the testconnection.exe in our update patch to test your connection string and permission. This tool cannot convert a disconnected adp file. It uses ADO (msado27.tlb) and OleDB (oledb32.dll) to access your backend server. If you are using a SQL Server Express and the file msado27.tlb is missing on your computer you can install the download mdac_typ.exe from our website.

Note: this tool will be activated after you install any of your new Access Whiz license key codes.

 

 

-9. Can you show me a sample VB routine to export Access table to XML file?

 

A:  here is a sample routine:

Sub xmlexportsample()
' for Access 2003 or later only
    Dim appAccess As Object
    On Error GoTo errx
    Set appAccess = CreateObject("Access.Application")
    appAccess.OpenCurrentDatabase ("c:\northwind\northwind.mdb")
    appAccess.ExportXML acExportTable, "Products", "c:\northwind\Products.xml", "c:\northwind\Products.xsd", , , 0
    appAccess.CloseCurrentDatabase
    Set appAccess = Nothing
    Exit Sub
errx:
    MsgBox Err.Description
End Sub

 

You need to add the Microsoft Access Object Library. This routine can only work with Access 2003 or later. If you encounter any problem with the function CreateObject("Access.Application") you may need to add the version number to "Access.Application" (e.g. Access.Application.12 for Access 2007).

 

You can also add the following function to a module in your Access file and run the Function xsdGen() in a RunCode macro:

 

Function xsdGen()
' for Access 2003 or later only
Dim t As String, outputfolder As String, i As Integer, tn As String
On Error GoTo xerror
outputfolder = "c:\DataSets\"
For i = 0 To CurrentDb.TableDefs.Count - 1
t = CurrentDb.TableDefs(i).Name
If (InStr(t, "MSys") <> 1 And Mid(t, 1, 1) <> "~") Then
tn = outputfolder & t & "DataSet.xsd"
Access.Application.ExportXML acExportTable, t, , tn, , , 1
End If
Next i
For i = 0 To CurrentDb.QueryDefs.Count - 1
t = CurrentDb.QueryDefs(i).Name
tn = outputfolder & t & "DataSet.xsd"
Access.Application.ExportXML acExportQuery, t, , tn, , , 1
Next i
Exit Function
xerror:
MsgBox Err.Description
Resume Next
End Function

 

 

- 10. I'm getting messages like "Error -2147417851", "Your Access form xxxx contains error : Method '~' of object '~' failed" and "Unable to convert your Access form xxxx" when I convert my form xxxx. The form xxxx does not get to convert. What should I do?

 

A:  You are getting those messages because your Access database may contain internal problems. Run the Compact and Repair Database. If you still cannot fix the file you will need to copy the file \acc2net85\blank.mdb to your input folder and import all the Access objects from your original Access file to this file. Convert the new mdb file instead of your original Access file.

 

- 11. How can I turn off Access security warning?

 

A:  You need to lower the security level. Open any Access file. Click Tools and then click Marco. Select Security and check the Low option on the Security Level tab.

 

- 12. How can I convert an adp file to a mdb file without using our adptomdb tool?

 

A:  For example, you can use the SQL statement SELECT TABLE_NAME,VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_CATALOG='Northwind'And TABLE_NAME<>'sysconstraints' And TABLE_NAME<>'syssegments' to retrieve northwind adp view definitions and manually export the other Access objects from an adp to a mdb.

 

- 13. How can I convert macros to modules?

 

A:  In the Database Window, click Macros under Objects and then click Tools on the tool bar and select Macros. Select the Convert Macros to Visual Basic option. It will convert your macros to modules. You can also follow the steps that describe in the article at http://office.microsoft.com/en-us/access/HP051866761033.aspx.

 

-14. How can I kill MSACCESS.EXE processes without using Windows Task Manager?

 

A:  For Windows XP or later you can use the DOS command "taskkill /F /IM msaccess.exe /T" to kill all running msaccess.exe processes.

 

-15. I could not start the converter on a PC and got the error:(8,-2147467229)Automation error A Microsoft Software Installer error was encountered. What should I do?

 

A:  There are two options you can try. 1. Use the Add/Remove Programs option on Control Panel to repair your Microsoft Access. 2. Use regedit.exe to check Access.Application. Under HKEY_CLASSES_ROOT you should have Access.Application and Access.Application.x. If Access.Application is missing or CLSID data value is not set you will need to manually add or modify:

 

Access.Application 

   CLSID   (Default)   REG_SZ   {copy CLSID Data from Access.Application.x}

   CurVer  (Default)   REG_SZ   Access.Application.x

 

where x is an installed Access version number.

 

Here is some VBA/VB .NET code to test your Microsoft Access Automation:

 

Function test()

' include Microsoft Access Object Library in reference list
Dim appAccess As Object
Dim objCurProj As CurrentProject
Dim objAcObj As AccessObject
On Error GoTo xerror
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase ("c:\northwind\northwind.mdb")
Set objCurProj = appAccess.CurrentProject
MsgBox ("# of forms:" & objCurProj.AllForms.Count)
appAccess.CloseCurrentDatabase
appAccess.Quit acExit
Set objCurProj = Nothing
Set appAccess = Nothing
Exit Function
xerror:
MsgBox ("Error:" & Err.Description)
End Function

 

or

 

Function test()
' include Microsoft Access Object Library in reference list
Dim appAccess As Object
Dim objCurProj As Access.CurrentProject
Dim objAcObj As Access.AccessObject
Try
appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase("c:\northwind\northwind.mdb")
objCurProj = appAccess.CurrentProject
MessageBox.Show("# of forms:" & objCurProj.AllForms.Count)
appAccess.CloseCurrentDatabase()
appAccess.Quit(Access.Constants.acExit)
objCurProj = Nothing
appAccess = Nothing
Catch ex As Exception
MessageBox.Show("Error:" & ex.Message)
End Try
End Function

 

 

Note: Please try our software on another PC with a different configuration if you are still getting the same error. 

 

- 16. We are getting the error “Runtime Error 2452” on all subforms that are referencing the Parent form controls. What should we do to eliminate the error?

 

A:  You can add "On Error Resume Next" at the beginning of each Sub/Function that contains Me.Parent controls.

 

-17. I got "Unable to convert Access forms due to Reserved Error" and "Error 2033: Name conflicts with existing module, project, or object library" when I converted one of my adp files?

 

A:  Your adp file may be corrupted. First you can try the Compact/Repair option. If it does not work you will need to recreate a new project file and import everything from that file.


Back to Top


 
Microsoft .NET 

- 1. How can I check to see if I have .NET Framework installed?

 

A: The following ASP .NET script can display the current .NET Framework:

 

<%@ Page Language="vb" %>
<%@ Import Namespace="System" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Label1.Text = Environment.Version.ToString()
End Sub
</script>
<html>
<body>
<form id="Form1" method="post" runat="server">
<asp:Label id="Label1" runat="server" />
</form>
</body>
</html>
 

or use the statement MessageBox.Show(Environment.Version.ToString()) in a VB .NET Windows application.


- 2. How can I correct the blank web form problem?

 

A: Use the URL http://localhost/northwind/default.htm instead of the file path   c:\inetpub\wwwroot\northwind\default.htm. If c:\inetpub\wwwroot\ is not the root directory of your default web server, you will need to create a subfolder under the root directory of your web server and then copy the content of the folder c:\inetpub\wwwroot\northwind to that directory.


- 3. I only see some texts on the converted web forms. How can I correctly display the aspx web forms?

A: IIS web server and .NET Framework on a Windows 2000/XP Professional System are required for ASP .NET scripts.  The url link http://www.asp.net/projects/cassini/download/CheckDotNet.aspx allows you to check your  .NET Framework installation. See .NET Framework Support on Windows Operating Systems at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/framewkwinsupp.asp. You can use Add/Remove Programs to check the installed Microsoft .NET Framework programs. If it is not in the installed program list you can find the information about How to get Microsoft .NET Framework 1.1 at http://msdn.microsoft.com/netframework/technologyinfo/howtoget/default.aspx.

If you are still getting the same problem  you will need to download and install .NET framework SDK 1.0a from the link http://www.microsoft.com/downloads/details.aspx?familyid=4fe5bdb5-c7a7-4505-9927-2213868a325b&displaylang=en

 

Back to Top
- 4. How can I fix the authentication error in my web.config file?

Server Error in '/' Application.
Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 36:           "Passport" and "None"

Line 37:     -->

Line 38:     <authentication mode="Windows" /> 

Line 39: 

Line 40:     <!--  APPLICATION-LEVEL TRACE LOGGING

Source File: c:\inetpub\wwwroot\northwindabc\web.config     Line: 38

A: you need to set access permission to Read and application permission to Execute for the folder.

If you are still getting the same error you need to use inetmgr to create the virtual directory.  

Right click on the folder name and select the properties. It will pop up the Properties window. Click the Create button.

 

If it still does not fix the problem you can temporarily to remove the line <authentication mode="Windows" /> while you are testing the website.

Note: the version 2.9.1110 or later of ANETVB and ANETVC will automatically create the virtual directory and set up the web sharing permission for the converted projects.

 

Back to Top
- 5. How can I fix the following Error?

 

Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>

 

A: The converted ASP .NET forms should be tested and debugged on a local web server first. By default your converted applications are configured with custom error messages turned off.  If your .net scripts run fine on your local server but on remote server they give the above error you need to do the following: Make sure your directory is setup as an IIS application. In addition, make sure the ASP.NET worker process has been given the appropriate permissions. Ask your web server administrator to set the application directory for asp.net and also give full control to asp.net account on your domain folder. Make sure your ASP .NET web server has MDAC 2.6 or higher installed. Some useful information about custom errors can be found at http://riderdesign.com/articles/displayarticle.aspx?articleid=1

 

- 6. How can I correct "You are not authorized to view this page" problem?

 

 

A: Do the following steps if you are using IIS:  1. Navigate to c:\Windows\Microsoft.NET\Framework\[FrameworkVersion]\Config    2. Open the Machine.Config file found there and change the userName attribute so that it's value is SYSTEM (i.e. userName="SYSTEM") 3. Save the file. 4. Open up a command prompt and type IISReset to restart IIS.

Back to Top
- - 7. How can I correct "Server Application Unavailable" problem?

 

A: Check out the following articles at http://www.asp.net/faq/ms03-32-Issue.aspx, http://forums.devshed.com/t81927/s.html. http://lucaslabs.net/blogs/overstreet/archive/2003/09/30/169.aspx,  http://support.microsoft.com/default.aspx?scid=kb;en-us;315158 and http://support.microsoft.com/default.aspx?scid=kb;EN-US;821157 to find a solution

 


- 8. How can I correct "Compilation Error" problem?

 

A: Install the correct version of OWC

 

Directory of C:\Inetpub\wwwroot\northwind\bin

 10/26/2000  08:51 AM            217,088 Interop.OWC.dll

  Edit and run the command batch file c:\inetpub\wwwroot\northwind\copyowc.bat if you use ANETVB or ANETVC.

Set access permission to Read and application permission to Execute for the folder c:\inetpub\wwwroot\northwind even if you are using ASP .NET scripts.


- 9. How can I fix the tab problem?

 

A: 

In order to use the Microsoft web tab control you need to install Microsoft ie web controls which you can download from Microsoft website at http://msdn.microsoft.com/en-us/library/ms529254(VS.85).aspx.

You need to have the following files:

Directory of C:\Inetpub\wwwroot\bin

07/13/2003  05:03 PM            180,224 Microsoft.Web.UI.WebControls.dll
10/26/2000  08:51 AM            217,088 Interop.OWC.dll
07/22/2002  12:05 PM             65,536 Interop.DAO.dll

               3 File(s)        462,848 bytes

Directory of C:\Inetpub\wwwroot\webctrl_client\1_0

01/07/2003  04:38 PM              4,584 MultiPage.htc
01/07/2003  04:38 PM             37,171 TabStrip.htc
01/07/2003  04:38 PM             88,774 toolbar.htc
01/07/2003  04:39 PM            115,833 treeview.htc
01/07/2003  04:39 PM             73,806 webservice.htc
01/07/2003  04:39 PM             82,486 webserviced.htc
09/23/2003  12:34 AM    <DIR>           images
09/23/2003  12:34 AM    <DIR>           treeimages

               6 File(s)        402,654 bytes


Directory of C:\Inetpub\wwwroot\northwind\bin      

The converter creates this subfolder and copies the dll files from C:\Inetpub\wwwroot\bin.

09/22/2003  01:15 PM              4,096 MSDATASRC.dll
09/22/2003  01:15 PM             77,824 ADODB.dll
09/22/2003  01:15 PM             15,360 stdole.dll
10/26/2000  08:51 AM            217,088 Interop.OWC.dll                               <<<<<< for office web component
07/13/2003  05:03 PM            180,224 Microsoft.Web.UI.WebControls.dll    <<<<<< for ie web controls
07/22/2002  12:05 PM             65,536 Interop.DAO.dll                                <<<<<< for DAO

               6 File(s)        560,128 bytes

To verify the installation of ie web controls you can convert the northwind and view the sample form Employees.aspx which contains tabs. Microsoft ie tab control does not work in ASP .NET 2.0 projects. It works in ASP .NET 2.0 code behind scripts or ASP .NET 1.x. The converter ANETVB will generate MultiView tags if you select the ASP .NET 2.0 project option. Run the self-extracted file iewcdll.exe in your c:\program files\acc2net85 folder if the file Microsoft.Web.UI.WebControls.dll is missing. You will need to re-run the converter or copy the dll file into c:\inetpub\wwwroot\northwind\bin folder.

 

Back to Top
- 10. Can I use my own style sheet for my generated aspx files?

 

A: Yes, place your style sheet file Styles.css in the input folder with your Access file and run the converters ANETVB or ANETVC. These programs will use the style sheet option if your Styles.css found. There is a sample Styles.css in the folder "c:\program files\acc2net85" folder if you have downloaded and installed our update patch.  The object names in the Styles.css are fixed since the conveter does not parse your style sheet file.


- 11. How can I fix the OWC Build error?

 

A: You need to remove the OWC reference under the Solution Explorer first.  Use the key sequence Alt-P and R to open up the following window.  Add the reference Microsoft Office Web Components  under the COM tab  to your project and rebuild the project.

 

 

 

Back to Top


- 12. ASP .NET 2.0 does not support some of ASP .NET 1.1 code that ANETVB generated. How can I fix those build errors?

 

A: 

1. Change 'System.Configuration.ConfigurationSettings' to 'ConfigurationManager'.

2. Change 'Page.IsStartupScriptRegistered(' to 'Page.ClientScript.IsStartupScriptRegistered('

3. Change 'Page.RegisterStartupScript("ClientScript", strScript)' to 'Page.ClientScript.RegisterStartupScript(GetType(Page), "ClientScript",strScript)'.

4.Remove the following statements:

#Region " "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
InitializeComponent()
End Sub
#End Region

 


- 13. Why did the Add or Edit not work on the converted web forms with the Northwind.mdb?

 

A: The converters in trial mode will refresh the working file c:\northwind\northwind.mdb when you start the converter. The changes that made to the working file in the previous run will not stay after you restart the converter. The converters in production mode do not have this problem.


- 14. How can I fix those 102 datasets related build errors in the ANETVB8/ANETVC7 converted northwind project under VS .NET 2005?

 

A: You need to use ANETVB8 v2.0.0601 or later. After you open the converted project with your VS .NET 2005 you need to run the command batch file xsd.bat which can be found in the output DataSets subfolder.  Those DataSets related build errors will all go away when you rebuild the VS .NET 2005 project. You will need to download and install .NET Framework 2.0 SDK if you are using Visual Studio 2008.

 

Back to Top


- 15. How can I fix these parser errors?

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'CascadingListsDemo2000.WebFormfrmCascadingListDemo2'.
Source Error:

 

Line 1:  <%@ Page language="vb" Codebehind="frmCascadingListDemo2.aspx.vb" 
AutoEventWireup="false" 
Inherits="CascadingListsDemo2000.WebFormfrmCascadingListDemo2" %>

Line 2:  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

Line 3:  <HTML>

Source File: C:\Inetpub\wwwroot\CascadingListsDemo2k\frmCascadingListDemo2.aspx     Line:1

Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0  

or

Parser Error 2

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load the assembly 'App_Web_abvpvd2w'. Make sure that it is compiled before accessing the page.

Source Error:
Line 1:  <%@ page language="VB" autoeventwireup="false" debug="true" inherits=
"testonlineform._default,App_Web_abvpvd2w" %>
Line 2:  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
Line 3:  <HTML xmlns="http://www.w3.org/1999/xhtml" >

Source File: /onlineform/default.aspx    Line: 1


Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

 

A: Error 1- Build the VS Project with your VS  .NET. Check your ASP .NET 2.0 port if your web server has both ASP .NET 1.x and ASP .NET 2.0 installed. You will get this error message if you are running an ASP .NET 2.0 pages on the default ASP .NET 1.x server.

Error 2- Your website folder might not be marked as an application. ASP .NET searched the wwwroot/bin folder for the file App_Web_abvpvd2w.dll and could not find it. You need to set the website to an application with the IIS Manager or copy the dll file to the wwwroot/bin folder.


- 16. How can I format the converted C# code?   

 

A: You can use the following key sequence to format your converted C#/VB code with your Visual Studio .NET 2002/2003: Ctrl-A (select all) and Ctrl-K Ctrl-F (format selection)  or your Visual Studio .NET 2005: Ctrl-A (select all)   Ctrl-E Ctrl-F (format selection) and Ctrl-E Ctrl-D (Format Document)

- 17. How can I find out physical path on my web hosting server? I want to use it in my connection string.        

 

A: You can upload the file c:\program files\acc2net85\findphysicalpath.aspx and view the page on your server if you have downloaded our update patch.

<HTML>
PhysicalApplicationPath: <%=Request.PhysicalApplicationPath()%><br>
</HTML>

 

-18. I can use the url http://localhost:1091/customers.aspx or http://localhost/northwind/default.htm but I cannot use the url http://localhost/northwind/customers.aspx on my ASP .NET 2.0 server. How can I fix this problem?

 

A:  You need to enable ASP .NET extension in your IIS. You can try to use the ASP .NET 2.0 command line tool aspnet_regiis.exe with -i option.

 

 

-19. How can I fix the Custom tool 'MSDataSetGenerator' failed while processing some xsd files for my ANETVB8 converted project?

 

A:  There are several things one can do to solve the MSDataSetGenerator problem which only happens for some users/systems:

1. You may need to manually double-click each "Run Custom tool MSDataSetGenerator" which listed in the task list while the project is opened. It will reduce the number of build errors.

2. Close the VB .NET project and run the batch file xsd.bat in the datasets subfolder of your output folder. View the log file xsdlog.txt for any error.

3. If you are using Access 2003 or later you can use accessxptoxsd.exe, one of our tools that is provided in the update patch. The program accessxptoxsd.exe can be found in your c:\program files\acc2net85 folder after you download and install our update patch.

The following is the description of accessxptoxsd.exe:

accessxptoxsd.exe - Access XP to xsd Converter 

This program will generate xsd files and associated vb/cs files for Access tables/queries/embedded form record controls. Access 2003 or later is required.

Required parameters:

microtools.us /F:accessfilename 
where
accessfilename: access mdb filename or access adp project filename

Optional parameters:

[/O:outputfolder] [/L:lan] [/T:tablename] [/Q:queryname] [/D:dataconnectionstring]
where
outputfolder: c:\ (default) or any existing folder name
lan:vb (default) or cs
It generates xsd files for all tables, queries and form record controls if no /T: or /Q: is specified.
It will generate new queries for all the embedded form record controls.
It generates xsd files for all tables, queries (views) for the database where the connection string is specified
with /D:.

Sample command lines:

""c:\program files\acc2net85\accessxptoxsd.exe"" microtools.us /F:c:\northwind\northwindp.adp /O:c:\northwind\ /L:vb /T:Suppliers
""c:\program files\acc2net85\accessxptoxsd.exe"" microtools.us /F:c:\northwind\northwindp.adp /O:c:\northwind\ /L:vb /Q:Alphabetical List of Products
""c:\program files\acc2net85\accessxptoxsd.exe"" microtools.us /F:c:\northwind\nwdadp.adp /O:c:\northwind\ /L:vb /D:Provider=sqloledb;Data Source=(local);Initial Catalog=northwind;User Id=;Password=;Integrated Security=SSPI
""c:\program files\acc2net85\accessxptoxsd.exe"" microtools.us /F:c:\northwind\Northwind_LinkedToSQL.mdb /O:c:\northwind\ /L:vb
""c:\program files\acc2net85\accessxptoxsd.exe"" microtools.us /F:c:\northwind\northwind.mdb /O:c:\northwind\ /L:vb

 

4. You may need manually to use VB .NET to create another project and dataset from the table or query. Copy the dataset xsd file and the vb file to replace the problem dataset files.


Back to Top

 

-20. How can I fix the following 'DAO.DBEngine is not defined' Error for my ASP .NET website?

 

Server Error in '/' Application.
--------------------------------------------------------------------------------

Compilation Error 
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: BC30002: Type 'DAO.DBEngine' is not defined.

Source Error:

Line 11: Dim DAODBEngine_definst As New DAO.DBEngine

 

A:  There are two ways to solve the problem. You need to set the website to an application with the IIS Manager first if it is not set to an application yet. Note: your web hosting service may not support DAO, Access or any custom dll files outside of the .NET framework if you are using an outside web hosting service. 

1. For a VS 2005 or later website you can copy the Interop.DAO.dll file to bin subfolder and add "Imports DAO" declaration statement to your code. Rebuild your website. Note: download our update patch if you cannot find the Interop.DAO.dll file in your acc2net85 folder.  

2. You can also try to add the DAO assembly <add assembly="DAO, Version=10.0.4504.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> to the web.config file and add "Imports DAO" to your code. Rebuild the website. If this error occurred on a web server you may need to use .NET Framework Configuration Console to add the file DAO.dll to the assembly cache. Check the version number and publickeytoken. If the web server does not have DAO assembly you could get the server error "Could not load file or assembly 'DAO, Version=10.0.4504.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified." after you published the web site onto a web server. Note: you don't need to add Interop.DAO.dll to your bin subfolder if the web server has DAO installed and has assembly DAO in assembly cache list.

After you fix the DAO.DBEngine problem you could get the following server error because the default ASPNET account may not have permission to open the database.

The Microsoft Jet database engine cannot open the file 'c:\inetpub\wwwroot\northwind\App_Data\Northwind.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

You need to add <identity impersonate="true" userName="useracount" password="password" />  to the web.config file.

Note: interop.DAO.dll can only be used on a x86 target platform.

 

-21. I cannot center my absolute positioned ASP .NET web forms. Do you have any suggestion?

A:  You can take a look at our Feedback form. We removed the header label and the close button from our original feedback form and renamed it as Feedback1.aspx. Then we placed the absolute positioned form as an iframe in the Feedback.aspx which used <div align="center"></div> to center its contents. A portion of our Feed Back form is as follows:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><body bgcolor="#365677" background="default_files/bg1.jpg">
<div align="center">
<TABLE cellSpacing=0 cellPadding=0 width=757 border=0 height="720" bordercolorlight="#004080">
<TBODY>
<TR>
<TD height="490" background="default_files/tile.jpg" align="left" valign="top" style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0px solid #cccccc; border-bottom: 0px solid #cccccc">
<iframe id="feedback" width="752px" height="670px" frameborder="0" scrolling="no" src="feedback1.aspx" ALLOWTRANSPARENCY="true" name="feedback" ></iframe>
</TD>
</TR>
</TBODY>
</TABLE>
</div>
</body>
</HTML>

 

-22. How do I use ANETVB8 to convert those main forms with mixed single-form and datasheet subforms?

 

A:  You need to run ANETVB8 more than once. You should convert subforms first and turn the converted subforms to user controls by manually changing the statement "Inherits System.Windows.Forms.Form" to "Inherits System.Windows.Forms.UserControl" in each converted vb file. After you convert the main forms on subsequent run you can open the converted VB .NET main forms and replace the incorrectly converted subforms with the user controls. 

Back to Top

-23. How do I start my conversion project with your ANETVB8 in general?

 

A:  With our ANETVB8 convert a conversion project generally can be divided into the following phases. Note: these are just our suggested conversion processes.

Converter Evaluation Phase:

1. Download the ANETVB8 trial demo and evaluate the northwind conversion.
2. Download our latest update patch that will update the folder c:\program files\acc2net85\.
3. Evaluate the program c:\program files\acc2net85\vba2vbnet.exe. It allows you to select your Access files and preview some converted code.
4. Run the program c:\program files\acc2net85\accesspreconversiontool.exe and get the free summary report of your Access file. 
5. Study the summary report and do the conversion project estimation.
6. Before you place your order write down the product serial number that can be found on the main screen of ANETVB8 converter.

Ordering Phase:

1. Go to our order page at https://www.microtools.us/_orderkey.htm and click the online order button to view our online order form or place your order. Get the AccessToVB6 option if you have many modules to convert. It allows you to take advantage of Microsoft VB .NET Upgrade Wizard.
2. You will receive the license key code information within 1 to 10 hours after you place your order online. You license key will activate the programs anetvb8.exe, adptomdb.exe, vba2vbnet.exe and accesspreconversiontool.exe.

Preparation Phase:

1. Make a copy of your Access file but make sure all the objects are working correctly. If your Access file is an Access 2007 or adp file you need to copy the file c:\program files\acc2net85\blank.mdb to your input folder file and save all the objects from your file to this new Access 2000 mdb file. If you have a large mdb file you use the Copy Access mdb Objects to a new mdb file option of your AccessPreConversionTool to create a new file for your conversion. You can also use our adptomdb to convert adp files to mdb files. This new file will contain table structures, queries, forms, reports, macros and modules.
2. Disable the start-up form and rename autoexec macro in your Access file. Change the system mdw file to the default system file. Remove the password or login if any object is password-protected or login required.

3. Check your Access file to make sure all the forms are working properly. Any error in your Access file may cause the convert hang or produce errors in the converted files.

UI and DataSet Conversion Phase:

1. Run the converter ANETVB8. 
2. Select the options to comment out the in-form code and exclude the converted modules. You can concentrate on the UI conversion and dataset generation first. If you have many forms to convert you do not have to convert them all at once. The converter will include all the converted forms in the project. Convert subforms before you convert main forms. You can also just convert all the forms twice.
3. Turn the converted subforms to user controls if necessary. Replace the statement "Inherits System.Windows.Forms.Form" to "Inherits System.Windows.Forms.UserControl" in each converted form.
4. Debug the converted VB .NET project and fix build errors from the UI, dataset and basic data handling portions of the converted project. 
5. Repeat the steps 1, 2, 3 and 4. Select a different group of forms to convert. Use the Windows Task Manager to end the converter and all the MSACCESS.EXE processes if it takes longer than a few minutes per form. Select few form to convert and skip the problem form.

Module Conversion Phase:

1. You can use the option in ANETVB8 or run the converter AccessToVB6. Select one simple form and convert the modules. Use the VB .NET 2008 or earlier to open the converted VB6 project. Your VB .NET will start the Upgrade Wizard to upgrade the VB6 code.
You can also use our vba2vbnet.exe program to convert the your code.
2. Open the VB .NET project that you complete on the UI and DataSet conversion phase. Include some of the converted modules. Start to debug each converted module and copy the code that generated from step 1 if they contain less build errors.
3. Repeat the step 2 until all the modules are debugged.

In-form Code Conversion Phase:

1. Open the VB .NET project that you complete on the above phase. You can start to uncomment the in-form code by removing the characters '>> from each form. Line by line and routine by routine, test and debug the in-form code.
2. Repeat the step 1 until all the forms are debugged.

 

-24. I used some of Access VBA functions in my Access applications. How can I convert them?

 

A:  You can include the declaration statement Friend AccessApplication_definst As New Access.Application in your code. Add AccessApplication_definst. in front of the Access VBA function names (e.g. change Nz to AccessApplication_definst.Nz and Eval to AccessApplication_definst.Eval).


-25. How does the converter ANETVB8 emulate Access continuous subforms in VB .NET winforms?

 

A:  The converter ANETVB8 has two options. The default option is converting continuous subforms to datagrids and the other option is converting continuous subforms to user controls (vertical bar or Microsoft Visual Basic Power Packs' Data Repeater for vb .net 2005/2008). Here are two screenshots from the sample Northwind's Categories form conversions (data grid and user control with a vertical bar):

 

       

 

Note: Microsoft Visual Basic Power Packs 3.0 can be downloaded at http://www.microsoft.com/downloads/details.aspx?familyid=371368a8-7fdc-441f-8e7d-fe78d96d4063&displaylang=en.

 

 

-26. I got the error message  "The underlying connection was closed: Unable to connect to the remote server." when I tried your ANETVBW web service demo. What should I do?


A:  In order to use ANETVBW web service demo your PC has to be set up as an ASP .NET server. Check your IIS and make sure http://localhost/ is running. You may need to disable your Personal Firewall. 

 

 

-27. I got the error messages  "Load Data Error: The request failed with HTTP status 401: Access Denied." or "HTTP Error 401 Unauthorized." when I tried your ANETVBW web service demo. What should I do?


A:  You need to enable Anonymous Access in the IIS Directory Security for the c:\inetpub\wwwroot\microtoolswebservice folder. 

For more detailed instructions please read the article at  http://geekswithblogs.net/ranganh/archive/2006/02/21/70212.aspx.

 

 

-28. I use linked SQL Server tables and DAO code in my Access file. What do I have to watch out for when I use your Access to ASP .NET converter?

 

A:  Option 1: Port your queries to your back-end SQL server as viewers or stored procedures and upgrade your DAO code to ADO or ADO .NET if you decide to phase out your Access file completely.


Option 2: You can keep a copy of your Access on your web server and allow your ASP .NET pages to access your SQL server data through that Access file.

For example, your Access file on the web server is C:\testsql\sqltest.mdb that contains the linked tables and the queries.

a. You can use the following connection string to access the data:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\testsql\sqltest.mdb;Password=;User ID=Admin"
In Access you use "Select * FROM [Shippers];" for the data in the table [dbo_Shippers]. You will get an unknown table/query Shippers error if you use the same sql statement in your ASP .NET pages. You need to change it to "Select * FROM [dbo_Shippers];". You need either to remove the dbo_ prefix from all your linked table names in your mdb file or add the dbo_ to all the table names that you use in the converted ASP .NET code.

b. You can also use the following connection string to access the data:
"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=xxxx\ASPNET;Initial Catalog=northwind;Data Source=(local)" where xxxx is the server name.

 

You will still need to port your Access queries to your SQL server as views or stored procedures for the ADO .NET code. You need to create an account with name ASPNET and the login name xxxx\ASPNET on your SQL server and set the correct permissions to access the tables. You will get Login Failed message if you use sa for the User ID. 

For the DAO code you need to have Interop.DAO.dll file in the bin subfolder and the following references in your script or code.

<%@ Import Namespace="DAO" %>
<%@ Import Namespace="DAO.DBEngineClass" %>
or 
Imports DAO
Imports DAO.DBEngineClass

Your ASP .NET code should have something like these statements:

Dim CurrentDb_ As String ="C:\testsql\sqltest.mdb"
Dim db As DAO.Database
db = DAODBEngine_definst.OpenDatabase(CurrentDb_)

 

-29. How can I set up the Microtools web service to evaluate ANETVBW's web service?

 

A:  Run the self-extracted file microtoolsws_for_aspnet1.exe in your acc2net85 folder if you are using ASP .NET 1.1 or the self-extracted file microtoolsws_for_aspnet2.exe if you are using ASP .NET 2. Change the folder properties of c:\inetpub\wwwroot\MicrotoolsWebService. Click the Web Sharing tab and click Share this folder radio button. Add MicrotoolsWebService Aliase and click Edit Properties button. Click the Execute for Application permission button. You can use the url http://localhost/microtoolswebservice/microtoolsservice.asmx to test the web service setup. The web service is ready if you don't get any server error. Check the version of your ASP .NET you are using and the version of microtoolswebservice you installed if you are getting server error. They have to be the same version.

 

-30. What do I need to change in order to test the ANETVBW converted northwind program with a different web server other than my default local host server?

 

A:  You can add two statements to the Sub Main() in the \code\northwind_.vb file to change the values of svc.Url and northwindconnstr. For example, mssqlwebserver is your web server and SQL server. You just need to modify the routine Main:

 

Sub Main()
svc.Url = "http://mssqlwebserver/microtoolswebservice/microtoolsservice.asmx"
northwindconnstr = "Provider=sqloledb;Data Source=(local);Initial Catalog=northwind;User Id=;Password=;Integrated Security=SSPI"
Application.Run(New FormMenu)
End Sub

 

After you change the routine Main and rebuilt the project I should be able to access the SQL server's northwind database on your mssqlwebserver from the desktop application northwind.exe.  

-31. Can you show me a sample of ASP .NET 2.0 GridView with Edit and Delete columns?

 

A:  Yes, here is the content of the file SampleGridView.aspx:

 

<%@ Page Language="vb" Debug="true" %>
<script runat="server" language="vb" >

'Sample GridView for ASP .NET 2.0

Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Call setGridView
End Sub
Sub setGridView()
Dim key As String() ={"SupplierID"}
EditGrid.DataSourceID="EditGridDataSource"
EditGrid.DataKeyNames =key
EditGridDataSource.DataFile="C:\northwind\northwind.mdb"
EditGridDataSource.SelectCommand="SELECT SupplierID, CompanyName, ContactName, ContactTitle, Address, City," & _
" Region, PostalCode, Country, Phone, Fax, HomePage FROM Suppliers"
EditGridDataSource.UpdateCommand="UPDATE Suppliers SET SupplierID = @SupplierID, CompanyName = @CompanyName," & _
" ContactName = @ContactName, ContactTitle = @ContactTitle, Address = @Address, City = @City, " & _
"Region = @Region, PostalCode = @PostalCode, Country = @Country, Phone = @Phone, Fax = @Fax, " & _
"HomePage = @HomePage WHERE (SupplierID = @SupplierID)"
EditGridDataSource.DeleteCommand="DELETE FROM Suppliers WHERE SupplierID = @SupplierID"
End Sub
Sub DeleteMessage (s As Object, args As GridViewDeletedEventArgs)
DeleteMSG.Text = "Record " & args.Keys("SupplierID") & " deleted"
End Sub
</script>
<html>
<form id="GridView_Suppliers" method="post" runat="server">
<h4>Sample ASP .NET 2.0 GridView with Edition and Deletion by <A href="https://www.microtools.us/">microtools.us</A></h4>
<asp:Label id="DeleteMSG" Text="" EnableViewState="False" Runat="Server"/>
<asp:AccessDataSource id="EditGridDataSource" Runat="Server"/>
<asp:GridView id="EditGrid" style="Z-INDEX:227;LEFT: 15px; POSITION: absolute; TOP:50px" runat="server" 
BackColor="#FFFFFF" Width="600px" Height="150px" Font-Size="8pt" 
BorderColor="LightSteelBlue" GridLines="None" 
AllowPaging="True"
AllowSorting="False"
AutoGenerateColumns="True"
CaptionAlign="Top"
BorderWidth="1"
EmptyDataText=" "
PageSize="5"
ShowHeader="True" 
HorizontalAlign="Center" 
HeaderStyle-BackColor="#D8DDEC"
AlternatingRowStyle-BackColor="#F2F3F8" 
AutoGenerateEditButton = "True"
AutoGenerateDeleteButton = "True"
OnRowDeleted="DeleteMessage"
/>
</form>
</html>

Our ANETVB version 2.9.0927 has a new option that can generate an ASP .NET 2.0 web page for all the tables in the Access database. The option is located on the Options tab. It will generate the file northwindgridviews.aspx in the output folder if you check the option before you convert the northwind sample.

 

-32. How can I change the default English Edit/Delete links in a GridView to non-English links or image buttons?

 

A: You need to add a command field to your code.

..
dbGridView.Columns.Clear

..


Dim CommandField1 As New CommandField
CommandField1.ButtonType = ButtonType.Image
CommandField1.CancelImageUrl="~\Images\but_cancel.gif"
CommandField1.DeleteImageUrl="~\Images\but_delete.gif"
CommandField1.EditImageUrl="~\Images\but_edit.gif"
CommandField1.UpdateImageUrl="~\Images\but_save.gif"
CommandField1.ShowEditButton= True
CommandField1.ShowDeleteButton= True
dbGridView.Columns.Add(CommandField1)

or

 

Dim CommandField1 As New CommandField
CommandField1.ButtonType = ButtonType.Link
CommandField1.CancelText="cancele" '
取消  
CommandField1.DeleteText="borre"     '
删除
CommandField1.EditText="redacte"      '编辑
CommandField1.UpdateText="guarde"  '储蓄 
CommandField1.ShowEditButton= True
CommandField1.ShowDeleteButton= True
dbGridView.Columns.Add(CommandField1)

 

 

-33. I had the statement appAccess = Server.CreateObject("Access.Application") in my ASP .NET page. I got the "Exception Details: System.UnauthorizedAccessException: Access is denied." error under ASP .NET 1.1 and also got the "Retrieving the COM class factory for component with CLSID {73A4C9C1-D68D-11D0-98BF-00A0C90DC8D9} failed due to the following error: 80070005." error under ASP .NET 2.0.  How can I fix them?

 

A: First, you need to make sure that your web server has Access installed. If you still have the same problem adding <identity impersonate="true" userName="yourusername" password="yourpassword" /> to your web.config file may help. You may need to check the identity of Access.Application. Open Control Panel, Administrative Tools, and double-click Component Services. Expand DCOM Config, right-click Access.Application, hit Properties, and switch to the Identity tab. Make the necessary changes and click the OK button. Note: Interop.Access.dll can only be used on a x86 target platform.

 

-34. When I opened the converted northwind Products form with VS 2003 I got a build error on the statement Me.objProductsDataSet = New northwind.northwind.ProductsDataSet. What should I do?

 

A: This is a Visual Studio 2003 bug. You need to remove the extra northwind. The original converted form contains the correct statement Me.objProductsDataSet = New northwind.ProductsDataSet. Sometimes Visual Studio inserts an extra northwind. 

 

-35. I used ANETVC7 to convert the northwind forms. I got many dataset related build errors when I opened up the converted projects with VS 2008. How can I fix those problems?

 

A: You will need to install .NET Framework 2.0 SDK and rerun the converter if the cs files for dataset xsd files are missing. If you got the errors similar to "The type or namespace name 'CategoriesDataSet' does not exist in the namespace 'northwind' (are you missing an assembly reference?)" these errors were caused by a Visual Studio Conversion Wizard's bug. The original converted files were correct but the wizard generated incorrect namespace for all the dataset cs files. You need to replace "namespace northwind.DataSets {" with "namespace northwind{" in all the cs files. 

 

-36. How can I fix the "Failed to access IIS metabase" error?

 

A: You may get the "Failed to access IIS metabase" error if you have both ASP .NET 1.x and 2.0 on your machine and you are running ASP .NET 1.x website under an ASP .NET 2.0 server. You will need to install .NET SDK 1.x if the web server only has ASP .NET 2.0 installed. Make sure you select the appropriate ASP .NET version for your website. You need to switch the website back to ASP .NET 1.x if the default ASP .NET version is set to ASP .NET 2.0. Click the Internet Services Manager under Administrative Tools of the Control Panel. Right click on your website name under Default Web Site and click the Properties. You can change the ASP .NET version under ASP .NET tab.

 

If you installed your IIS after installing the .NET you may need to run the ASP.NET IIS Registration Tool aspnet_regiis.exe -i. Note: this will reset all the web applications on your system.

 

You may need to run aspnet_regiis.exe -ga ASPNET too.

 

-37. I noticed your tool converts Access class to module. Can I simply change the code from "Module" to "Class" manually? 

 

A: Yes, you can. There was no function or module property value for us to use to distinguish the standard module and class module in Access. A routine was added to our converters to scan the code in each module. Now the current version of our converters can generate "Class" for those modules that contain 'Property' or 'Events' and also added an option box to convert module which name starts with 'c' to class. You may still need to check the code and make necessary change if the module type is incorrect. 

 

-38. I am getting "Error 3 Type 'Access.Application' is not defined. " in my converted project. What should I do?

 

A: Copy Interop.Access.dll into bin subfolder and include "Imports Access" in your code. Rebuild your website. The publish website needs to have the same version of Access installed. You can also take a look at the forums at  http://forums.msdn.microsoft.com/en-US/vbide/thread/58cc74b4-8a5e-4ee8-adbb-cc1bcc07f916/. Note: your web hosting service may not support DAO, Access, Excel or any custom dll files outside of the .NET framework if you are using an outside web hosting service.

 

- 39. I got the "Element does not contain the required attribute Name " error running the VB.NET Upgrade Wizard. What should I do?

 

A: A blank Name property in the .vbproj file can cause this problem. You may need to edit the values of VersionMajor for DAO and Access in your vbproj file if you have a different version of DAO and Access installed:

 

<Reference
Name = "DAO"
Guid = "{00025E01-0000-0000-C000-000000000046}"
VersionMajor = "5"
VersionMinor = "0"
Lcid = "0"
WrapperTool = "tlbimp"
/>
<Reference
Name = "Access"
Guid = "{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}"
VersionMajor = "9"
VersionMinor = "0"
Lcid = "0"
WrapperTool = "tlbimp"
/>

 

-40. How can I fix the "Name Global is not declared" build error for the converted command buttons?

 

 

 

A: The resources for the images might be stored incorrectly but your image files might be saved in the Image subfolder. You need to delete the problem .Image statements and re-map the images in the form design view.

 

 

 

-41. How can I fix the compilation error "BC30002: Type 'DAO.DBEngine' is not defined"?

 

 

A: Copy the interop.*.dll files from your c:\program files\acc2net folder to the bin subfolder of your project folder.

 

-42. How can I fix the "Problem to load -No value given for one more required parameters" run-time error when I use LoadDataGrid routine?

 

 

A: You need to check and correct the SQL string in the statement right before the Call LoadDataGrid statement. Currently the converter cannot automatically check the SQL string for you. 

 

-43. Can you show me a sample VB .NET form using Microsoft Visual Basic Power Packs 3.0 Data Repeater control?

 

A: Yes, we can. Here is the sample form in design view and in runtime view:

 

 

' Sample Form using Microsoft Visual Basic Power Packs 3.0 Data Repeater Control

Option Strict Off
Option Explicit Off
Imports System.IO
Imports System.Data
Imports System.Data.OleDb
Imports VB = Microsoft.VisualBasic
Public Class Product_ListDataSet
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer. 
'Do not modify it using the code editor.
Friend WithEvents DataRepeater1 As Microsoft.VisualBasic.PowerPacks.DataRepeater
Friend bs As BindingSource
Friend WithEvents ProductName_ As System.Windows.Forms.TextBox
Friend WithEvents ProductNameLabel As System.Windows.Forms.Label
Friend WithEvents QuantityPerUnit_txt As System.Windows.Forms.TextBox
Friend WithEvents QuantityPerUnitLabel As System.Windows.Forms.Label
Friend WithEvents UnitPrice_txt As System.Windows.Forms.TextBox
Friend WithEvents UnitPriceLabel As System.Windows.Forms.Label
Friend WithEvents Discontinued As System.Windows.Forms.CheckBox
Friend WithEvents DiscontinuedLabel As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.ProductName_ = New System.Windows.Forms.TextBox
Me.ProductNameLabel = New System.Windows.Forms.Label
Me.QuantityPerUnit_txt = New System.Windows.Forms.TextBox
Me.QuantityPerUnitLabel = New System.Windows.Forms.Label
Me.UnitPrice_txt = New System.Windows.Forms.TextBox
Me.UnitPriceLabel = New System.Windows.Forms.Label
Me.Discontinued = New System.Windows.Forms.CheckBox
Me.DiscontinuedLabel = New System.Windows.Forms.Label
Me.DataRepeater1 = New Microsoft.VisualBasic.PowerPacks.DataRepeater
Me.DataRepeater1.ItemTemplate.SuspendLayout()
Me.DataRepeater1.SuspendLayout()
Me.SuspendLayout()
'
'ProductName_
'
Me.ProductName_.AcceptsReturn = True
Me.ProductName_.Anchor = System.Windows.Forms.AnchorStyles.None
Me.ProductName_.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
Me.ProductName_.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.ProductName_.Cursor = System.Windows.Forms.Cursors.IBeam
Me.ProductName_.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.ProductName_.ForeColor = System.Drawing.SystemColors.ControlText
Me.ProductName_.Location = New System.Drawing.Point(105, 18)
Me.ProductName_.MaxLength = 0
Me.ProductName_.Multiline = True
Me.ProductName_.Name = "ProductName_"
Me.ProductName_.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.ProductName_.Size = New System.Drawing.Size(207, 20)
Me.ProductName_.TabIndex = 201
'
'ProductNameLabel
'
Me.ProductNameLabel.Anchor = System.Windows.Forms.AnchorStyles.None
Me.ProductNameLabel.BackColor = System.Drawing.Color.Transparent
Me.ProductNameLabel.Cursor = System.Windows.Forms.Cursors.Default
Me.ProductNameLabel.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.ProductNameLabel.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(128, Byte), Integer))
Me.ProductNameLabel.Location = New System.Drawing.Point(4, 22)
Me.ProductNameLabel.Name = "ProductNameLabel"
Me.ProductNameLabel.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.ProductNameLabel.Size = New System.Drawing.Size(86, 16)
Me.ProductNameLabel.TabIndex = 202
Me.ProductNameLabel.Text = "Product Name:"
Me.ProductNameLabel.TextAlign = System.Drawing.ContentAlignment.TopRight
'
'QuantityPerUnit_txt
'
Me.QuantityPerUnit_txt.AcceptsReturn = True
Me.QuantityPerUnit_txt.Anchor = System.Windows.Forms.AnchorStyles.None
Me.QuantityPerUnit_txt.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
Me.QuantityPerUnit_txt.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.QuantityPerUnit_txt.Cursor = System.Windows.Forms.Cursors.IBeam
Me.QuantityPerUnit_txt.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.QuantityPerUnit_txt.ForeColor = System.Drawing.SystemColors.ControlText
Me.QuantityPerUnit_txt.Location = New System.Drawing.Point(105, 42)
Me.QuantityPerUnit_txt.MaxLength = 0
Me.QuantityPerUnit_txt.Multiline = True
Me.QuantityPerUnit_txt.Name = "QuantityPerUnit_txt"
Me.QuantityPerUnit_txt.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.QuantityPerUnit_txt.Size = New System.Drawing.Size(138, 20)
Me.QuantityPerUnit_txt.TabIndex = 203
'
'QuantityPerUnitLabel
'
Me.QuantityPerUnitLabel.Anchor = System.Windows.Forms.AnchorStyles.None
Me.QuantityPerUnitLabel.BackColor = System.Drawing.Color.Transparent
Me.QuantityPerUnitLabel.Cursor = System.Windows.Forms.Cursors.Default
Me.QuantityPerUnitLabel.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.QuantityPerUnitLabel.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(128, Byte), Integer))
Me.QuantityPerUnitLabel.Location = New System.Drawing.Point(3, 46)
Me.QuantityPerUnitLabel.Name = "QuantityPerUnitLabel"
Me.QuantityPerUnitLabel.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.QuantityPerUnitLabel.Size = New System.Drawing.Size(96, 18)
Me.QuantityPerUnitLabel.TabIndex = 204
Me.QuantityPerUnitLabel.Text = "Quantity Per Unit:"
Me.QuantityPerUnitLabel.TextAlign = System.Drawing.ContentAlignment.TopRight
'
'UnitPrice_txt
'
Me.UnitPrice_txt.AcceptsReturn = True
Me.UnitPrice_txt.Anchor = System.Windows.Forms.AnchorStyles.None
Me.UnitPrice_txt.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
Me.UnitPrice_txt.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.UnitPrice_txt.Cursor = System.Windows.Forms.Cursors.IBeam
Me.UnitPrice_txt.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.UnitPrice_txt.ForeColor = System.Drawing.SystemColors.ControlText
Me.UnitPrice_txt.Location = New System.Drawing.Point(326, 46)
Me.UnitPrice_txt.MaxLength = 0
Me.UnitPrice_txt.Multiline = True
Me.UnitPrice_txt.Name = "UnitPrice_txt"
Me.UnitPrice_txt.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.UnitPrice_txt.Size = New System.Drawing.Size(53, 20)
Me.UnitPrice_txt.TabIndex = 205
Me.UnitPrice_txt.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
'
'UnitPriceLabel
'
Me.UnitPriceLabel.Anchor = System.Windows.Forms.AnchorStyles.None
Me.UnitPriceLabel.BackColor = System.Drawing.Color.Transparent
Me.UnitPriceLabel.Cursor = System.Windows.Forms.Cursors.Default
Me.UnitPriceLabel.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.UnitPriceLabel.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(128, Byte), Integer))
Me.UnitPriceLabel.Location = New System.Drawing.Point(262, 46)
Me.UnitPriceLabel.Name = "UnitPriceLabel"
Me.UnitPriceLabel.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.UnitPriceLabel.Size = New System.Drawing.Size(58, 16)
Me.UnitPriceLabel.TabIndex = 206
Me.UnitPriceLabel.Text = "Unit Price:"
'
'Discontinued
'
Me.Discontinued.Anchor = System.Windows.Forms.AnchorStyles.None
Me.Discontinued.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
Me.Discontinued.CheckAlign = System.Drawing.ContentAlignment.TopLeft
Me.Discontinued.Cursor = System.Windows.Forms.Cursors.Default
Me.Discontinued.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Discontinued.ForeColor = System.Drawing.SystemColors.ControlText
Me.Discontinued.Location = New System.Drawing.Point(318, 22)
Me.Discontinued.Name = "Discontinued"
Me.Discontinued.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Discontinued.Size = New System.Drawing.Size(15, 24)
Me.Discontinued.TabIndex = 207
Me.Discontinued.UseVisualStyleBackColor = False
'
'DiscontinuedLabel
'
Me.DiscontinuedLabel.Anchor = System.Windows.Forms.AnchorStyles.None
Me.DiscontinuedLabel.BackColor = System.Drawing.Color.Transparent
Me.DiscontinuedLabel.Cursor = System.Windows.Forms.Cursors.Default
Me.DiscontinuedLabel.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.DiscontinuedLabel.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(128, Byte), Integer))
Me.DiscontinuedLabel.Location = New System.Drawing.Point(339, 20)
Me.DiscontinuedLabel.Name = "DiscontinuedLabel"
Me.DiscontinuedLabel.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.DiscontinuedLabel.Size = New System.Drawing.Size(85, 16)
Me.DiscontinuedLabel.TabIndex = 208
Me.DiscontinuedLabel.Text = "Discontinued"
'
'DataRepeater1
'
'
'DataRepeater1.ItemTemplate
'
Me.DataRepeater1.ItemTemplate.Controls.Add(Me.DiscontinuedLabel)
Me.DataRepeater1.ItemTemplate.Controls.Add(Me.UnitPriceLabel)
Me.DataRepeater1.ItemTemplate.Controls.Add(Me.QuantityPerUnitLabel)
Me.DataRepeater1.ItemTemplate.Controls.Add(Me.ProductNameLabel)
Me.DataRepeater1.ItemTemplate.Controls.Add(Me.ProductName_)
Me.DataRepeater1.ItemTemplate.Controls.Add(Me.QuantityPerUnit_txt)
Me.DataRepeater1.ItemTemplate.Controls.Add(Me.UnitPrice_txt)
Me.DataRepeater1.ItemTemplate.Controls.Add(Me.Discontinued)
Me.DataRepeater1.ItemTemplate.Size = New System.Drawing.Size(490, 80)
Me.DataRepeater1.Location = New System.Drawing.Point(3, 16)
Me.DataRepeater1.Name = "DataRepeater1"
Me.DataRepeater1.Size = New System.Drawing.Size(498, 87)
Me.DataRepeater1.TabIndex = 209
Me.DataRepeater1.Text = "DataRepeater1"
'
'Product_ListDataSet
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.Silver
Me.ClientSize = New System.Drawing.Size(524, 173)
Me.Controls.Add(Me.DataRepeater1)
Me.Name = "Product_ListDataSet"
Me.Text = "Product List"
Me.DataRepeater1.ItemTemplate.ResumeLayout(False)
Me.DataRepeater1.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Product_List_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim strsql As String
Try
DataRepeater1.BeginResetItemTemplate()
strsql = "SELECT * FROM [Products]"
bs = New BindingSource
Dim conn As New OleDbConnection(northwindconnstr)
Dim dt As New DataTable
Dim da As New OleDbDataAdapter(strsql, conn)
da.Fill(dt)
bs.DataSource = dt
DataRepeater1.DataSource = bs
DataRepeater1.EndResetItemTemplate()
Catch eLoad As System.Exception
End Try
End Sub
Private Sub DataRepeater1_DrawItem(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.PowerPacks.DataRepeaterItemEventArgs) Handles DataRepeater1.DrawItem
Dim currItem As DataRowView
If (e.DataRepeaterItem.ItemIndex >= 0) Then
currItem = bs.Item(e.DataRepeaterItem.ItemIndex)
DirectCast(e.DataRepeaterItem.Controls("ProductName_"), TextBox).Text = currItem.Item("ProductName").ToString
DirectCast(e.DataRepeaterItem.Controls("QuantityPerUnit_txt"), TextBox).Text = currItem.Item("QuantityPerUnit").ToString
DirectCast(e.DataRepeaterItem.Controls("UnitPrice_txt"), TextBox).Text = currItem.Item("UnitPrice").ToString
DirectCast(e.DataRepeaterItem.Controls("Discontinued"), CheckBox).Checked = currItem.Item("Discontinued")
End If
End Sub
End Class

 

- 44. Can you show me a sample ASP .NET 2.0 form using DAO?

 

A: Yes, you can download a sample at https://www.microtools.us/downloads/testdao_aspnet2.zip.

 

-45. How does your ANETVB8 convert Access  AfterUpdate Event for textbox to VB .NET WinForm?

 

A: ANETVB8 adds the following code to the vb file if xxxAfterUpdate is found in VBA for a textbox control: 

 

Dim xxxChanged As Boolean = False
Friend Sub xxxTextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xxx.TextChanged
xxxChanged = True
End Sub
Friend Sub xxxLostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xxx.LostFocus
If (xxxChanged) Then Call xxx_AfterUpdate()
xxxChanged = False
End Sub

Friend Sub xxx_AfterUpdate()
..
..
End Sub
..
..
Private Sub objyyyyDataSet_PositionChanged()
Dim icurrent As Integer, currentID As String, strsql As String
Try
xxxChanged = False
..

 

where xxx is a name of textbox control

 

-46. Can your converters handle any new features of Access 2007?

 

A: No, our converters cannot handle any new features of Access 2007 yet.

 

-47. How do you handle reports in a converted VB .NET application?

 

A: There are many ways to handle your reporting needs. You need to decide what reporting tool you want to use. They can be Access, Crystal Reports or SQL Server Reporting. Crystal Reports allow you to export the reports to Excel, Word, PDF and etc. We provide our customers some viewers and code for the first two reporting tools.

Access: we include a program called runaccessreport.exe that our customers can distribute with their VB .NET applications. In their VB .NET desktop applications can have the following routine to open the report.

Public Sub DoCmdOpenReport(ByRef Reportname As String, Optional ByRef View As Integer = 2, Optional ByRef FilterName As String = "", Optional ByRef WhereCondition As String = "")
Dim x As Object, cm As String
If(View = 0 or View = 2) Then
cm = """..\runaccessreport.exe ""/dbname:""c:\northwind\northwind.mdb"" /report:""" & Reportname & """ /view:" & View & " /filter:""" & FilterName & """ /where:""" & WhereCondition & """ "
Else
cm = """..\runaccessreport.exe ""/dbname:""c:\northwind\northwind.mdb"" /report:""" & Reportname & """ /filter:""" & FilterName & """ /where:""" & WhereCondition & """ /format:HTML /folder:""c:\accessreports"" /extension:htm"
End If
x = Shell(cm, AppWinStyle.Hide)
End Sub


Crystal Reports: we include Crystal Reports viewers called cr*.exe that our customers can distribute with their VB .NET applications. In their VB .NET applications can have the following routine to open the reports.

Public Sub DoCmdOpenReport(ByRef Reportname As String, Optional ByRef View As Integer = 2, Optional ByRef FilterName As String = "", Optional ByRef WhereCondition As String = "")

Dim x As Object, cm As String
Try
' change the following statement if it is for different version of Crystal Reports
cm = """..\crv85.exe ""/f:..\CrystalReports\" & Reportname & ".rpt"""
' cm = """..\crv9.exe ""/f:..\CrystalReports\" & Reportname & ".rpt"""
' cm = """..\crv10.exe ""/f:..\CrystalReports\" & Reportname & ".rpt"""
' cm = """..\crv11.exe ""/f:..\CrystalReports\" & Reportname & ".rpt"""
' cm = """..\crv115.exe ""/f:..\CrystalReports\" & Reportname & ".rpt"""
x = Shell(cm, AppWinStyle.Hide)
Catch ex85 As Exception
End Try
End Sub

The another way to display a Crystal Reports they can use the following routine:

Public Sub DoCmdOpenReport(ByRef Reportname As String, Optional ByRef View As Integer = 2, Optional ByRef FilterName As String = "", Optional ByRef WhereCondition As String = "")
Dim CrReportViewer As Object
CrReportViewer.ShowReport(Reportname)
End Sub

They can also set up a report web server that allows the end-users to view the reports. If you need heavily coded reports you can use Crystal Reports RDC, Report Designer Component. It comes with Crystal Reports 8/8.5/9/10/11/11.5 Developer Edition.

-48. How the program ANETVB8 handle multi-column combo boxes and continuous subforms?

 

A: Our ANETVB8 converter supports multi-column comboboxes. It uses a "|" to separate the columns. A datagrid may be used for some subforms. The datagrid does not support combobox column. The mainform and subform can be linked with multiple keys. Continuous subform can be converted to datagrid control, user control with vertical bar or data repeater control. 

 

-49. Can you show me how to use System.Drawing with ASP .NET?

 

A: Yes, here is a simple example:

 

<%@ Page Language="vb" Debug="true" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Imaging" %>
<script runat="server" language="vb" >
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim objBitMap As New Bitmap(200, 200)
Dim objGraphics As Graphics
Dim theBrush As Brush
Dim theFont As Font
objGraphics = Graphics.FromImage(objBitMap)
objGraphics.Clear(Color.LightGray)
theFont = New System.Drawing.Font("Arial", 14, System.Drawing.FontStyle.Bold)
theBrush = Brushes.Red
objGraphics.DrawString("TEST", theFont, theBrush, 100, 100)
objBitMap.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif)
End Sub
</script>
<HTML>
</HTML>

 

-50. Can you show me how to use AppSettings to set connection string for my VB .NET application?

 

A: Before you build your project you need to define your connection string as

Dim connectionString As String

connectionString = Configuration.ConfigurationSettings.AppSettings("ConnectionString") 'For VB .NET 1.x

or
connectionString = ConfigurationManager.AppSettings("ConnectionString") 'For VB .NET 2.0

in your VB .NET applications and have an App.config file contains the code:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ConnectionString" value="your connection string" />
</appSettings>
</configuration>

VB .NET will generate a config file in the bin subfolder when you build the project. If you need to change the value of a key you change App.config before you build the project or change the config file in your bin subfolder after your application is built.

 

-51. How can I fix the build error on resources.resources or resources.resx?

 

A: You need to delete resources.resx object from the Solution Explorer Window and then rebuild your project. You may also need to reload the missing images. Some image files can be found in the images subfolder.


-52. Can you show me an example to sort a DataView in VB .NET?

 

A: Here is an example to display a sorted product list:

 

Dim dt As DataTable, dv As DataView, drv As DataRowView
..
dt = New DataTable("Products")
dv = dt.DefaultView
dv.Sort = "ProductName DESC"
For Each drv in dv
Debug.WriteLine(drv("ProductName").ToString())
Next

Note: to access  the sorted data you need to use DataRowView.

 

- 53. How can I get Windows logged in user name in VB .NET?

 

A: You can use the following statement in VB .NET to get current user name:

Dim UserName As String = System.Security.Principal.WindowsIdentity.GetCurrent().Name

 

- 54. How can I print an Access report in a VB .NET application?

 

A: You can use the following routine to print an Access Report in VB .NET Windows application:

 

Sub printAccessReport(ByRef dbname As String, ByRef rptname As String, ByRef view As String, ByRef filterstr As String, ByRef wherestr As String)

Dim appAccess As Object

Dim iview As Short

Try

appAccess = CreateObject("Access.Application")

appAccess.OpenCurrentDatabase(dbname)

iview = 0

If (view >= "0" And view <= "9") Then iview = Val(view)

appAccess.DoCmd.OpenReport(rptname, iview, filterstr, wherestr)

appAccess.DoCmd.Close(Access.AcObjectType.acReport, rptname)

appAccess.CloseCurrentDatabase()

appAccess = Nothing

Catch ex As Exception

MessageBox.Show(ex.Message, "printAccessReport")

End Try

End Sub

 

- 55. How can I pass values between forms in a VB .NET application?

 

A: You can specify some public variables in a module and use them in any form (e.g. you can specify and use the values of v1 and v2 in any of your forms after you declare "Public v1 As String, v2 As String" in a module). 

 

 

- 56. When I used my web service routine to access the Access file, I got the error: The Microsoft Jet database engine cannot open the file 'c:\northwind\northwind.mdb'. It is already opened exclusively by another user, or you need permission to view its data. It worked on my local server and some network servers but not on a hosting web server. Do you have any suggestion?

 

A: You could get the above server error because the default ASPNET account does not have permission to view the database. You need to add <identity impersonate="true" userName="useracount" password="password" />  to the web.config file. For a website hosted on a Vista you may need to change Advanced Security Settings for the web folder. 

 

- 57. I have problem to switch url in my Smart Client-web service Application. Do you have any suggestion?

 

A: Check your web service folder properties.  The URL Behavior should be set to Dynamic. You can simply change the Web Reference URL in your application.


 

For example, you have the following declaration in your code:

Dim svc As Microtools.MicrotoolsService = New Microtools.MicrotoolsService

 

To switch the url for the web service you can change

svc.url = "http://localhost/MicrotoolsWebService/MicrotoolsService.asmx"

 to 

svc.url ="http://www.mywebsite/MicrotoolsWebService/MicrotoolsService.asmx"

 

 

-58. How can I clear out the Scripting.FileSystemObject and MSDASC.DataLinks build errors in VB .NET?

 

A: You need to add the Microsoft Scripting Runtime reference for Scripting.FileSystemObject and Microsoft OLE DB Service Component 1.0 Type Library reference for MSDASC.DataLinks to your VB .NET project.

 

 

-59. How can I fix the HTTP Error 403 - Forbidden Internet Explorer error when I use http://localhost/directviewer/?

 

A: You need to use http://localhost/directviewer/default.aspx instead.

 

-60. How can I fix the "System.Data.OleDb.OleDbException: No value given for one or more required parameters" message from one of the FillDataSet routines?

 

A: You need to check your SQL string in Me.OleDbSelectCommand1.CommandText statement to see any field name with any non-alphanumeric character. For example, you have a field named E-Post. It will get you that exception error. You need to manually change your SQL strings from E-Post to [E-Post].

 

-61. I am converting a non-English version of Access file. VS .NET was unable to read the project file. How can fix the problem?

 

A: You need to open the project file with the notepad and then save it in UTF-8 or Unicode format. If you are using ANETVB8 version 2.2.0328 or early you need to download our latest update patch. We have corrected the project file problem in ANETVB8 version 2.2.0428 or later.

 

-62. How can I fix the errors "Could not delete from specified tables." and "Operation must use an updateable query." with my web pages and the applications with web services on an XP server? The same web pages work on Windows 2000 server fine.

 

A: You need to change the data file folder property to share the folder on the network. You may get the same errors if the file is read-only or the file is opened by another user. If you open the database manually and it says 'The database is read-only' rebooting the system may help.

 

-63. Can you show me some VB .NET code to create a report without using Crystal Reports or SQL Reporting Services? 

 

A: Yes, here is the code that ANETVBR generated from northwind CustomerLabels report (the compiled version of the reports can be downloaded at Sample compiled VB .NET reports DEMO for .NET 2.0 or later ):


'Copyright (C)2010 MICROTOOLS.US. All rights reserved.
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.OleDb
Imports System.Drawing
Imports System.IO.File
Imports System.Text
Imports System.Windows.Forms
Imports System.Drawing.Drawing2D
Imports System.Drawing.Printing
Imports Microsoft.VisualBasic
Imports System.Configuration
Public Class Rpt_CatalogSubreport
Protected AppPath As String
Protected leftMargin As Single, topMargin As Single, bottomMargin As Single
Protected printWidth As Single, printHeight As Single, rightMargin As Single
Protected iPage As Integer, nPages As Integer, tHeight As Single
Protected filename As String
Protected connectionString As String
Protected currentPosition As Single, detailheight As Single
Protected textWidth As Single, textHeight As Single, textLeft As Single
Protected labeltext As String, thePen As Pen, theBrush As Brush, theFont As Font
Protected dv As DataView, dr As DataRow, dr0 As DataRow
Protected top0 As Integer, endofreport As Boolean, pline As Boolean
Protected nrs As Long, ithr As Long
Protected string_format As StringFormat
Protected layout_rect As Rectangle
Private Function GetData() As DataView
Dim dt As DataTable, daData As System.Data.OleDb.OleDbDataAdapter
Try
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\northwind\northwind.mdb;Password=;User ID=Admin"
Dim Conn As New System.Data.OleDb.OleDbConnection(connectionString)
Conn.Open()
Dim getdataSQL As String
getdataSQL = "SELECT * FROM [Products] ORDER BY [Products].[ProductName];"
Dim getrs As New System.Data.OleDb.OleDbCommand(getdataSQL, Conn)
getrs.CommandType = CommandType.Text
daData = New System.Data.OleDb.OleDbDataAdapter(getrs)
dt = New DataTable("RS")
daData.Fill(dt)
Catch ex As System.Exception
MessageBox.Show("Problem to load the data!" & ex.Message)
End Try
Return dt.DefaultView
End Function
Sub PrintDetailSection(ByVal e As System.Drawing.Printing.PrintPageEventArgs, ithr As Long, dr As DataRow)
Dim top As Single
top = top0
' ProductID - ProductID
currentPosition = top + 3.6
textWidth = 770/ 12.5
textHeight = 285/ 12.5
textLeft = leftMargin + 3459/ 12.5
labeltext = dr.Item("ProductID").ToString()
theFont =New System.Drawing.Font("Times New Roman", 10, System.Drawing.FontStyle.Regular)
theBrush = Brushes.Black
string_format = New StringFormat
string_format.Alignment = StringAlignment.Near
layout_rect = New Rectangle(textLeft, currentPosition, textWidth, textHeight)
e.Graphics.DrawString(labeltext, theFont, theBrush, layout_rect, string_format)
' QuantityPerUnit - QuantityPerUnit
textWidth = 2210/ 12.5
textHeight = 285/ 12.5
textLeft = leftMargin + 4755/ 12.5
labeltext = dr.Item("QuantityPerUnit").ToString()
theFont =New System.Drawing.Font("Times New Roman", 10, System.Drawing.FontStyle.Regular)
theBrush = Brushes.Black
string_format = New StringFormat
string_format.Alignment = StringAlignment.Near
layout_rect = New Rectangle(textLeft, currentPosition, textWidth, textHeight)
e.Graphics.DrawString(labeltext, theFont, theBrush, layout_rect, string_format)
' UnitPrice - UnitPrice
textWidth = 1055/ 12.5
textHeight = 285/ 12.5
textLeft = leftMargin + 7308/ 12.5
labeltext = dr.Item("UnitPrice").ToString()
theFont =New System.Drawing.Font("Times New Roman", 10, System.Drawing.FontStyle.Regular)
theBrush = Brushes.Black
string_format = New StringFormat
string_format.Alignment = StringAlignment.Far
layout_rect = New Rectangle(textLeft, currentPosition, textWidth, textHeight)
e.Graphics.DrawString(labeltext, theFont, theBrush, layout_rect, string_format)
' ProductName - ProductName
textWidth = 3350/ 12.5
textHeight = 285/ 12.5
textLeft = leftMargin + 15/ 12.5
labeltext = dr.Item("ProductName").ToString()
theFont =New System.Drawing.Font("Times New Roman", 10, System.Drawing.FontStyle.Bold)
theBrush = Brushes.Black
string_format = New StringFormat
string_format.Alignment = StringAlignment.Near
layout_rect = New Rectangle(textLeft, currentPosition, textWidth, textHeight)
e.Graphics.DrawString(labeltext, theFont, theBrush, layout_rect, string_format)
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim rowCounter As Integer, top1 As Integer, left1 As Integer
top0 = topMargin
iPage = iPage + 1
top1 = top0
left1 = leftMargin
top0 = top1
For rowCounter = ithr To nrs - 1
dr = dv.Table.Rows(rowCounter)
e.HasMorePages = False
If (printHeight <= top0 + 2 * detailheight) Then
top0 = topMargin
e.HasMorePages = True
ithr = rowCounter
Exit For
End If
Call PrintDetailSection(e, ithr, dr)
top0 = top0 + detailheight
Next
leftMargin = left1
End Sub
Private Sub Rpt_CatalogSubreport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AppPath = Application.StartupPath().Replace("\bin", "\")
End Sub
Private Sub printDocument1_BeginPrint(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles PrintDocument1.BeginPrint
Dim PrintAreaHeight, PrintAreaWidth As Int32
With PrintDocument1.DefaultPageSettings
PrintAreaHeight = .PaperSize.Height - topMargin - bottomMargin
PrintAreaWidth = .PaperSize.Width - leftMargin - rightMargin
End With
If PrintDocument1.DefaultPageSettings.Landscape Then
Dim intTemp As Int32
intTemp = PrintAreaHeight
PrintAreaHeight = PrintAreaWidth
PrintAreaWidth = intTemp
End If
If (PrintAreaHeight > printHeight) Then printHeight = PrintAreaHeight
If (PrintAreaWidth > printWidth) Then printWidth = PrintAreaWidth
PrintDocument1.DefaultPageSettings.Landscape = printWidth > printHeight
Me.setupReport()
End Sub
Private Sub printDocument1_EndPrint(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles PrintDocument1.EndPrint
End Sub
Private Sub btnPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPreview.Click
Me.PrintPreviewDialog1.ShowDialog()
End Sub
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
printDialog1.AllowSomePages = True
Dim result As DialogResult = PrintDialog1.ShowDialog()
If (result = DialogResult.OK) Then PrintDocument1.Print()
End Sub
Private Sub btnSetup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSetup.Click
pageSetupDialog1.Document = printDocument1
pageSetupDialog1.ShowDialog()
End Sub
Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
Me.Dispose()
Me.Close()
End Sub
Private Sub setupReport()
detailheight = 30
leftMargin = 50
topMargin = 30
iPage = 0
top0 = 0
nPages = 0
dv = GetData()
nrs = dv.Table.Rows.Count
endofreport = False
ithr = 0
End Sub
End Class

Note: similar code can be used on an ASP .NET server for server-side reports or for pdf file creation if a pdf printer installed.

 

Sample VB .NET code with Print Document API call:

 

Imports System.Drawing
Imports System.Text
Imports System.Drawing.Printing


Protected labeltext As String, thePen As Pen, theBrush As Brush, theFont As Font
Protected string_format As StringFormat
Protected layout_rect As Rectangle

Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage

labeltext = "Hello Print Document!"
theFont =New System.Drawing.Font("Arial", 12, System.Drawing.FontStyle.Bold)
theBrush = Brushes.Black
string_format = New StringFormat
string_format.Alignment = StringAlignment.Near
layout_rect = New Rectangle(50, 40, 463,21)
e.Graphics.DrawString(labeltext, theFont, theBrush, layout_rect, string_format)
End Sub

Sample VB .NET code with PDFSharp API call:

Imports System
Imports System.Drawing
Imports PdfSharp
Imports PdfSharp.Drawing
Imports PdfSharp.Pdf
Module Sample1


Dim gfx As XGraphics, page As PdfPage, document As PdfDocument
Dim labeltext As String, thePen As XPen, theBrush As XBrush, theFont As XFont
Dim string_format As XStringFormat
Dim layout_rect As XRect


Sub SampleReport1()
document = New PdfDocument
page = document.AddPage
gfx = XGraphics.FromPdfPage(page)
labeltext = "Hello PDFSharp!"
theFont = New XFont("Arial", 12, XFontStyle.Bold)
theBrush = XBrushes.Black
string_format = New XStringFormat
string_format.Alignment = XStringAlignment.Near
layout_rect = New XRect(50, 40, 463, 21)
gfx.DrawString(labeltext, theFont, theBrush, layout_rect, string_format)
document.Save("c:\sample1.pdf")
End Sub


End Module

 

-64. When I browse one of my websites on http://localhost it keeps prompting me for username and password in an authentication required window. How can I avoid this?

 

A: You can add <identity impersonate="true" userName="uuu" password="ppp" /> to the web.config file where uuu is one of the Windows user and ppp is the password or remove <identity impersonate="true">. You can also change the Configuration of your ASP .NET website. Open ASP .NET Configuration Settings by clicking Edit Configuration button on the ASP .NET tab of your website Properties through your IIS Management tool. Check the Local impersonation, enter user name and password Application tab. 

If you cannot fix the problem and you are using Firefox you need to do the following steps:

1. Open Firefox and type about:config in the address bar 
2. type ntlm in the textbox.
3. Double click on network.automatic-ntlm-auth.trusted-uris and type localhost.
4. Click on OK. 
5. Close the browser

 

Open up internet explorer and do the followings:
Tools > Internet Options > 
Advanced > Check Enable Integrated Windows Authentication under Security section.
Security > Local Intranet > Custom Level > Check Automatic Logon under User Authentication - Logon section.

Security > Local Intranet > Sites > Uncheck Automatically detect intranet network.
Security > Local Intranet > Sites > Check Include all local (interanet) sites not listed in other zones, Include all sites that    bypass the proxy server and Include all network paths (UNCs).
Security > Local Intranet > Sites > Advanced > Add http://localhost to the zone if needed.

 

-65. Can you show me how to use the CreateObject  function in VB .NET applications?

 

A: In VBA code one can have code as follows:

Dim objAcObj As Object
Dim appAccess As Object
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase ("c:\northwind.mdb")
...
...
appAccess.Quit
Set appAccess = Nothing


In VB .NET code one needs to change them to:

Imports Access
...
...
Dim objAcObj As AccessObject, appAccess As New Access.Application
appAccess.OpenCurrentDatabase("c:\northwind.mdb")
...
...
appAccess.CloseCurrentDatabase()
appAccess.Quit(2)  'Microsoft.Office.Interop.Access.Constants.acExit
appAccess = Nothing

Note: add Microsoft Access Object Library as a COM reference to the VB .NET project.

 

-66. How can I use IIf function in c#?

 

A: You can change IIf(expression, value1, value2) to (expression? value1 : value2) in c#.

 

 - 67. I am getting a DAO error from my converted desktop application which works on some of the PCs but does not work on others. The error description: Could not load file or assembly 'dao, Version=10.0.4504.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. File name: 'dao, Version=10.0.4504.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' How can I fix my program?

 

A: You could get the error on a Windows Server 2008 or Windows 7 if the program was built on a XP or Windows 2000 and just was copied from the development system to the others. You need to build the setup for deployment or need to rebuild your WinForm desktop project on a newer OS. First, you need to double click the bin folder under Solution Explorer and remove the yellow marked reference dao and then use the Add Reference option under Project on the toolbar to add the COM reference Microsoft DAO 3.6 Object Library. 

 

- 68. When I upgraded VS 2003 or VS 2005 projects to VS 2008 or VS 2010 I got the Custom tool error: Failed to generate code. ".", hexadecimal value 0x00, is an invalid character. Line 2, position 1. What can I do to fix the errors?

 

A: The VS 2008 and VS 2010 IDE could not recognize the xml version tag <?xml version="1.0" encoding="utf-8" ?> in xsd files. You can simply open the xsd files in VS 2008/ VS 2010 IDE and remove the xml version tag from each xsd file and then rebuild the project. Now the command line program toxsd2008.exe can be used to remove the xml version tag line for you. You can use the following command line to clean up the xsd files in a folder: "c:\program files\acc2net85\toxsd2008.exe" /f:folderpath.   

 

- 69. I added Interop.Office.dll in my C:\Inetpub\wwwroot\northwind\bin folder. I did not get any build error when I built the website. Why do I get the following error when I browse the website with http://localhost/northwind?BC30009: Reference required to assembly 'Interop.Office, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null' containing the implemented interface 'Office.IAccessible'. Add one to your project. 

 

A: You need to add the file Interop.Office.dll in your C:\Inetpub\wwwroot\bin folder too.

 

- 70. How can I fix VB .NET 2010 build error: Could not load file or assembly 'Interop.MSComCtlLib,...?

 

A:  You may have some other referenced components missing. If you are also getting "The referenced component 'AxOWC10' or 'Excel' could not be found" errors click 'Show All Files' under Solution Explorer and expand References. Remove those not found references. It may clear out the build error that you are getting.


Back to Top


 
Crystal Reports 


- 1. What's the minimum requirement for the report conversion? How can I test for the conversion requirement?

 

A: The minimum requirement is to install Crystal Report Designer Component 8 or later Runtime. The files test8.mdb, test85.mdb, test9.mdb test10.mdb and test11.mdb in your c:\program files\acc2net85 folder can be used to test your Crystal Reports Report Design Component and licensing setup. Test8.mdb is for CR 8.  Test85.mdb for CR 8.5 and test9.mdb is for CR9.  Run the macro, testreportcreation. It should produce the Crystal Report file c:\northwind\test.rpt if your RDC runtime setup is correct. For CR 9 you need to have a RCAPI license. For CR10 you need to have Advanced Developer Edition. If you don't have the full version of RDC the converted reports may not contain the fields and you may not be able to view the data in your converted reports. For Crystal Reports 8.5 you need to have the crviewer.dll file from SP3 and for Crystal Reports 11.5 you need to have the file creviewer.dll file from SP2 Full build or later.

If you don't have a required RDC you can try SAP's Crystal Reports XI Developer Edition 30-Day Evaluation Download.

 


- 2. I have the following error when I convert reports: No report is generated due to missing Crystal Reports RDC or ActiveX component can't create object.

 

A: It meant that your craxdrt.dll (for CR 8/8.5/10/11/11.5) or craxdrt9.dll (for CR9) was either missing or not registered. You need to run Regsvr32 to register the RDC dll files. For CR 9 you need to purchase a RCAPI license.  You can check your report conversion problems with one of the files testcr8.mdb for CR 8, testcr85.mdb for CR 8.5 or testcr9 for CR 9 under the converter folder.  You need to have and register the files p2soledb.dll and p2sodbc.dll if you are getting the error 4: server has not been  opened.  To view the Crystal Reports you also need to have and register the file crviewer.dll.

 


- 3. My converter program folder is not c:\program files\acc2net85. The converter hung during the report conversion and no converted report was found.

 

A: You need to create a new folder c:\program files\acc2net85 as a working folder for the converter


- 4. I got server errors ASP 0177 and 438 when I viewed my converted Northwind reports.

 

A: You may need to reinstall your Crystal Reports if you try the CR samples at http://localhost/scrsamples/ and get the same error.

The file rptserver.asp in c:\program files\acc2net85 is for CR 8.5.  You may have an incorrect version of rptserver.asp in c:\inetpub\wwwroot\northwind.  You need to copy the file rptserver.asp that came with your Crystal Reports into both folders
c:\program files\acc2net85 and c:\inetpub\wwwroot\northwind.  To copy the correct rptserver.asp to c:\program files\acc2net85 you need to run the batch command file c:\program files\acc2net85\copyrptserver8.bat if you are using CR 8 or run the batch command file c:\program files\acc2net85\copyrptserver9.bat if you are using CR 9.  For CR 8 users you may need to change the line 10 of northwindreports.asp to the following line if the error persists after copying the correct version of rptserver.asp:

Set session("oApp") = Server.CreateObject("Crystal.CRPE.Application")

Or

Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.8")

Back to Top
- 5. The converter hung while the report conversion program was running. It did generate some reports but I had unknown field name error in each report.

 

A: Use Windows Task Manager to end the running conversion program and MS Access processes. You need to install full version of Crystal Reports 8/8.5/9/11 Developer Edition/10 Advanced Developer Edition  or install all the necessary files if you just copy craxdrt.dll to your computer. On Vista or Windows 7 PC you need to run the converter as administrator.


- 6. I got a blank report when I tried to view the report from a client's computer. How can I correct this problem?

 

A: You may need to run the program npviewer.exe on your client computer .


- 7. I have Crystal Report Designer Component installed. The converted reports were Okay but I have problem to view them on my local web server.

 

A: The control script generated by our converter is for ActiveX report viewer. You may need to have Crystal Reports ActiveX report viewer on your report web server. You may also need to have the correct version of rptserver.asp in the folder c:\inetpub\wwwroot\northwind.


- 8. The new report pre-viewer has been added to AccessToCR. How can I take advantage of this feature?

 

A: Now one can select the preview mode option on the first tab of AccessToCR.  It will start a new program which allows you to select any Access 2000 file. The program will convert and display the converted report for a selected Access report.The program cannot display the converted reports with any conversion error, but we hope this new feature allows you to evaluate our report converter better. Please remember your will not be able to view any sub-report in a converted report because the converter in preview mode cannot save any converted sub-report on your hard drive.


- 9. I tried to open my converted Northwind Invoice report but it took long time to load the data. What can I do?

 

A: With RDC 10, 11 or 11.5 the table link cannot be added correctly if any table name consists blank space. Before you view the converted report make sure the tables are correctly linked. You need to open the report in Design view and  click the "By Key" radio button and the Link button of the Links tab under Database Export. Note: the table link problem has been resolved in the AccessToCR version 3.11.1009 or later.

 

-10. Some of my Access reports contain sub-reports. Not all the sub-report fields get converted. What can I do?

 

A: If you have sub-report fields in some of your Access reports please convert your reports in several runs. Select the sub-reports to convert in first run and then convert the rest of reports in subsequent runs. Just remember that Access allows multi-level subreports but Crystal Reports only allows single sub-reports.

 

-11. How do I fix the "ActiveX component can't create object" problem when I try to view the reports?

 

A:Check the version of Crystal Reports viewer you installed. You may use the incorrect version of Crystal Reports viewer or one of the required dll file is missing.

 

-12. What files do I need to port to the client computers in order to use your included desktop crystal report viewer crv85.exe?

 

A: You need to have the following 48 files in the directory of c:\winnt\crystal or c:\Windows\crystal:

02/01/2003 12:00a 176,128 c2supprt.dll
07/18/2003 06:56a 5,206,077 craxdrt.dll
01/29/2003 12:00a 49,223 crtslv.dll
01/29/2003 12:00a 734,504 crviewer.dll
01/29/2003 12:00a 270,336 crxf_pdf.dll
01/29/2003 12:00a 200,755 crxf_rtf.dll
01/29/2003 12:00a 40,960 emfgen.dll
01/29/2003 12:00a 188,416 keycode.dll
01/31/2003 12:00a 208,127 p2bbde.dll
01/29/2003 12:00a 94,208 p2bdao.dll
01/31/2003 12:00a 249,856 p2bxbse.dll
01/29/2003 12:00a 53,248 p2ctdao.dll
01/29/2003 12:00a 65,536 p2irdao.dll
01/29/2003 12:00a 94,208 p2sevt.dll
01/29/2003 12:00a 163,840 p2smon.dll
01/29/2003 12:00a 286,720 p2sodbc.dll
01/31/2003 12:00a 204,800 p2soledb.dll
01/29/2003 12:00a 103,424 pg32conv.dll
02/01/2003 12:00a 598,016 sscdlg.dll
02/01/2003 12:00a 2,498,560 sscrc.dll
01/29/2003 12:00a 1,163,264 sscsdk80.dll
01/29/2003 12:00a 58,672 sviewhlp.dll
01/29/2003 12:00a 128,296 swebrs.dll
11/08/2000 01:46p 24,576 u252000.dll
11/08/2000 01:46p 24,576 u25dts.dll
11/08/2000 01:46p 28,672 u2dapp.dll
01/04/2002 10:54a 28,672 u2ddisk.dll
12/14/2001 03:24p 40,960 u2dmapi.dll
07/26/2001 02:32p 53,248 u2dnotes.dll
02/03/2001 06:05a 102,400 u2dpost.dll
02/03/2001 06:05a 28,672 u2fcr.dll
12/12/2001 09:12a 36,864 u2fdif.dll
06/19/2001 01:06p 45,056 u2fhtml.dll
07/09/2003 01:24a 53,248 u2fodbc.dll
10/25/2000 05:15p 65,536 u2frdef.dll
12/12/2001 09:14a 36,864 u2frec.dll
03/28/2003 02:07a 40,960 u2fsepv.dll
09/11/2003 06:07a 98,304 u2ftext.dll
12/12/2001 03:33p 40,960 u2fwks.dll
04/11/2001 02:49p 106,496 u2fwordw.dll
08/08/2003 10:56a 225,280 u2fxls.dll
02/03/2001 01:28a 225,280 u2fxml.dll
11/08/2000 01:46p 24,576 u2l2000.dll
09/04/2002 04:37p 106,496 u2lcom.dll
11/08/2000 01:46p 24,576 u2ldts.dll
11/08/2000 01:46p 49,152 u2lfinra.dll
11/08/2000 01:46p 24,576 u2lsamp1.dll
01/29/2003 12:00a 159,824 xqviewer.dll.

 

Note: these files can be found on your CR 8.5 CD or any system with CR 8.5 installed.

Once you have the above files you also need to run the program regsvr32 to register the files craxdrt.dll and crviewer.dll.

 

The files asycfilt.dll, COMCAT.DLL, comdlg32.ocx, gdiplus.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll, stdole2.tlb,usp10.dll and VB6STKIT.DLL may also be required to install on the client computers.

 

If you are using DAO/OLEDB/ODBC data connection for any of your reports you will need to install the required drivers. If any required driver is missing you may get the "Server has not yet been opened." error for all the reports that use such connection.

 

-13. Can AccessToCR handle Access sub-reports?

 

A:Yes, AccessToCR can handle one level Access sub-reports. You need to run the converter at least twice. Convert sub-reports and the reports with no sub-report first. Convert any reports with sub-reports in the second run. Note: CR cannot handle more than one level sub-reports. 

 

-14. I have CR 8.5 Developer Edition and a later version of CR Developer Edition. Which RDC should I use?

 

A:AccessToCR supports multiple version of CR. It may produce better CR 8.5 reports than the other versions. 

 

-15. I have multiple versions of Crystal Reports installed on my computer. Can I use the same AccessToCR converter to convert my Access reports to different versions of Crystal Reports?

 

A: Yes, our AccessToCR is an All-in-One converter that supports CR 8 to 11.5. You don't need to purchase or install different version of the converter. Our AccessToCR (v 3.4.05.31 or later) detects and lists all the versions of RDC (8 - 11.5) that can be found on your system. It will convert your Access reports to the version that you selected and even output to different folder for each version of CR.

 

-16. Why do I get the Run-time error '380' Invalid property value when I run AccessToCR?

 

A: You can get that Run-time error if you only have CR 7 and don't have any required RDC 8 or later.

 

-17. How come all my fields in detail section of the converted reports are missing?

 

A:You don't have the full version of RDC if the converted northwind reports also have the same problem. You may have the Professional Edition of CR. You need to have the Developer or Advanced Developer Edition of CR. Compare the craxdrt*.dll file on your system with the ones below. If you have a smaller file it means that you don't have the full version of RDC.

 

CRAXDRT.DLL 8.0.0.371     2000/01/28 07:16:48  5.29 MB
CRAXDRT.DLL 8.5.0.217     2001/02/04 22:07:16  4.91 MB
CRAXDRT.DLL 8.5.0.512     2002/07/24 14:31:59  4.96 MB
CRAXDRT9.DLL 9.2.0.448    2002/07/14 23:55:13  5.85 MB
CRAXDRT.DLL 10.0.5.800    2004/09/08 22:53:35  7.34 MB
CRAXDRT.DLL 11.0.0.1282  2005/03/07 23:06:05  7.83 MB
CRAXDRT.DLL 11.5.8.826    2007/03/01 05:30:17  7.89 MB

 

If you have the full version of RDC and the fields are missing your Access file may have missing tables or queries. Make sure your Access reports in your mdb file are running correctly. If you are converting the reports in an adp file you need to run our adptomdb tool to convert it to an mdb file before using AccessToCR. Email support@microtools.us if you need more information.

 

-18. How come there is no database connection and all the fields are converted to text objects in the converted reports?

 

A: Please check your Access file. Your original reports have to be working correctly. The converter needs to gather field information from the tables and queries. It can only convert the fields to text objects if the database is not connected or the required tables/queries are missing. Make sure you have the latest version of AccessToCR and Crystal Reports Service Pack.

 

-19. I have some carriage returns and line feeds in my Access reports labels. I can see them in the converted CR 8 and 8.5 reports but not in CR XI reports. What can I do?

 

A: There are two types of text objects: simple and complex. Only complex text objects can handle carriage returns and line feeds. They are handled by CRPAIG*.DLL. If you want to use carriage returns and line feeds in your text objects, you will need to force the text objects to be complex. To do this, double-click on the text object to edit it and enter carriage returns (press the enter key) inside of it.

 

-20. I am getting the Logon failed  Details: [Database Vendor Code -675686748] error when I use crviewer. What should I do?

 

A: Most of Crystal Reports Viewers are not fully backward compatible. You will need to upgrade your reports or have the correct version of report viewer. You may get that error if you use CRviewer11 to open a CR 8 report. You need to open the CR 8 report with CR XI to verify the database and save the report in CR XI format before you use CRviewer11 to view the report. You could also get the  following two errors when you use CR XI viewer to view CR 8/8.5/9 reports:

Table '' could not be found.

Failed to retrieve data from the database. Details: [Database Vendor Code:-540806602]

Note: the database connection or tables in some version 9 and earlier reports can be lost during upgrade. In such case all the database fields will be missing.

 

 

-21. I have noticed that you made many improvements in your AccessToCR recently. Is there any new feature?

 

A: Yes, many improvements made to our AccessToCR recently. We cleaned up many minor problems in our report converters. The version 3.5.0704 or later of AccessToCR allows you to select the version 3.0 of AccessToCR when it is in trial mode or production mode. You can use this option when the current version of AccessToCR hangs during report conversion. If you are a licensed user our pre-viewers will also save the reports that you select. AccessToCR and the Pre-Viewers will check or create new query if an embedded SQL statement with JOIN for report record source is used. It can eliminate some link problems in the converted reports. Now the new version converts checkboxes and unbounded text fields. It also outputs your in-report vba code to inreportvba.bas.

 

 

-22. I got "The OpenReport action was canceled" error during the Northwind trial conversion. The AccessToCR previewer hung. How can I fix this error?

 

A: Try these steps: 1. On XP or Windows 2000 you may need to log in the Administrator account and n Vista or Windows 7 you may need to run the program as Administrator. 2. You may need to activate your Access to fully enable your Access features. 3. You may need to add a local printer as default if you are using a network printer.

 

-23. How can I create a VB6 project to view my Crystal Reports c:\test.rpt?

 

A:

1. Open a new VB6 project
2. Add a new form
3. Click Project on the toolbar and select References
4. Check the reference boxes for Crystal Reports Viewer 8/8.5/9/10/11/11.5 Control and Crystal Reports 8/8.5/9/10/11/11.5 ActiveX Designer Run Time Library 
5. Add CRViewer control onto your form
6. Add the following code

Dim crxApplication As New CRAXDRT.Application
Dim crxReport As New CRAXDRT.Report
Private Sub Form_Load()
Dim rptfilename As String, formula As String, stext As String
rptfilename = "c:\test.rpt"
formula = ""
stext = ""
Call rptviewer(rptfilename, formula, stext)
End Sub
Sub rptviewer(rptfilename As String, formula As String, stext As String)
On Error GoTo crerror
If (rptfilename <> "") Then
rptnamex.Caption = rptfilename
Set crxReport = crxApplication.OpenReport(rptfilename)
CRViewer1.ReportSource = crxReport
If (formula <> "") Then CRViewer1.SearchByFormula (formula)
If (stext <> "") Then CRViewer1.SearchForText (stext)
CRViewer1.ViewReport
Set crxReport = Nothing
Set crxApplication = Nothing
End If
Exit Sub
crerror:
MsgBox Err.Description
Exit Sub
End Sub

-24. How can I fix the "c:\Program Files\acc2net85\ac0082kv11.mde file not found" error?

 

 

A: You might not install the software in the default folder c:\program files\acc2net85 and used a version earlier than v3.5.0722.. Please download our latest update patch.

 

-25. How can I install Crystal Reports XI when I am getting the setup error: Crystal Reports XI installation ended prematurely because of an error?

 

A: You can get this fatal error on a newer XP SP3 or Vista system. Instead of installing CR XI you can install the Crystal Reports XI Release 2 that can be downloaded from Business Objects website and use your Crystal Reports XI product activate number to activate it.

 

-26. Can your AccessToCR convert my reports that use linked tables with a SQL Server database?

 

A: You can select an OleDB/ODBC option as your target data source on the Connection tab of AccessToCR. Just make sure to use the correct Initial Catalog name in the connection string. The converted reports will be connected to the specified SQL Server database. Note: if you use Access queries in your reports you need to port them to your SQL server as views.

 

You can also convert your Access reports with our AccessToCR's default target data source first and then open your converted reports in Design View and use the Set Location option under Database on the toolbar to manually change the database to the target data source. 

 

- 27. Why did I get an empty group header/footer in Crystal Reports for one of my converted reports?

 

A:  Check that report grouping fields in Access design view. Remove any unnecessary grouping field if you have one group field with no header and no footer. 

 

- 28. I am having a problem to view the converted Northwind's invoice report with my CR XI. It keeps on reading data. How can I fix this problem? Note: the converted CR 8.5 reports works fine. 

 

A:  There were two missing links in the converted CR XI invoice report. You need to open the invoice report with your CR XI. Select the Database Expert option under Database on the toolbar. Click the Link button on the Links tab and then click the OK button. It should fix the problem. Make sure you have the latest version of AccessToCR and Crystal Reports Service Pack installed.

 

-29. Why did I get the error message "This field name is not known." when I tried your AccessToCR Preview mode? 

 

A:  It may mean that one or more of the tables could not be added to the Crystal Reports. If you are using Access Workgroup with your Access application you will need to turn off the workgroup logon. If you are using non-Access data connection you need to port your queries that used by your reports to the backend database and test the connection on the AccessToCR's connection tab.

 

-30. Why am I getting the error "A number is required here" in the formula {@Sum1}*{@Sum2}? How can I fix it? 

 

A:  This must be a Crystal Reports bug. You need to change the formula from {@Sum1}*{@Sum2} to {@Sum1}*CCur({@Sum2}) or {@Sum1}*CDbl({@Sum2}).

 

- 31. How does your AccessToCR handle any report control that references to a form control? 

 

A:  The version 3.10.0327 or later of our converters (trial and production) convert those controls to parameter fields. All versions prior to the version 3.10.0327 and all previewers convert those controls to formula fields.  

 

- 32. I tested your AccessToCR with Crystal Reports Developer Edition 8.5 and Crystal Reports Developer Edition XI R2. Sometimes XI R2 version seems better, but sometimes the 8.5 is better. What version of AccessToCR would you prefer to use? 

 

A:  There are slightly different in the converted reports because different versions of Crystal Reports are all different. You can have different version of Crystal Reports installed on one computer. You can select one version of CR converter first. If the result for the report is not perfect you can always select the other CR option to convert. It allows you to select the best converted result. That's why we include 15 different versions of AccessToCR under one license at one low price. To get the best result you need to install the latest version of AccessToCR and Crystal Reports Service Pack. Note: you should download and install the SP2 or later if you are using CRXI Release 2 (version 11.5.0.313 or earlier). 

-33. Why did I get the error "Too many arguments have been given to this function." when I ran your AccessToCR previwers? 

 

A:  The converted reports or our previewers prompt that error most likely because Crystal Reports handle field conversion differently. For example, you use a text table field xx in mm/yy format in your Access report. Our converter will create a formula field with the formula ToText({tablename.xx}, "mm/yy"} in the converted Crystal Reports. You may need to manually change to ToText(CDate({tablename.xx}), "MM/yy"} or fix the field type in the source table to correct the problem since our converter cannot automatically fix your formula for you. Either way you will need to clean up the data for that field first. In order to preview the reports you will need to check the checkbox to comment out the formulas.

 

--34. I am using some custom functions in my Access reports. How can I convert those functions to be used in my converted Crystal Reports? 

 

A:  You need to convert your VBA functions to VB6 or VB .NET code and build an user function library. You can take a look at the article "Creating a Crystal Reports Custom Function Library" at http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=103 that shows a step-by-step example.

 

-35. I am getting "Error found in Access xxxx (2). The OpenReport action was canceled" or "Run-time error 2501". How can I fix the problem? 

 

A:  Check your Access. You may need to validate your default Access License before you can use the converter. Seen Q/A 22 above.

 

-36. Why are some of text fields in my converted/pre-viewed reports missing? 

 

A: Some of the record sources that used in Access reports cannot be added in the Crystal Reports. The text fields in those reports will be missing. This could happen if you only installed a RDC runtime or had not installed service pack. Make sure you have the latest version of AccessToCR and Crystal Reports Service Pack. Note: the RDC of CR XI R2 SP1 or earlier had a few bugs that could cause incorrect conversion. Check the converted northwind reports and most of them should be contain no conversion error if you have the updated RDC and the latest version of converter. 

 

-37. Is there any OS compatibility issue with RDC that is used by AccessToCR? 

 

A: Yes, the early versions of RDC have some compatibility issues on Vista and Windows 7 machines. You should use RDC XI/XI R2 on the machines with those Windows. RDC 9 and older versions should be used on a Windows 2000 or XP machine. Our converters were developed on Windows XP SP3 machines. You should run our converters as Administrator and you can set the program in compatibility mode to run.

 

Please take a look at the article "How to run a program in Vista with Administrator Rights" and "How to set a program to always run as administrator" at http://www.lancelhoff.com/how-to-run-a-program-in-vista-with-administrator-rights/.

 

-38. I am having problem to view some of the converted reports that have parameter fields. What do I need to do to correct the problem? 

 

A:  The links in those converted reports might not link correctly. It occurs in the northwind demo 'Employee Sales by Country' report. You need to open the converted report in Crystal Reports Design View and click Visual Link Expert under Database on the toolbar. Check the links. Clear links if they are linked incorrectly. Add the correct links manually. Note: this may only occur in CR 8/8.5/9 reports. The problem has been corrected in AccessToCR version 3.11.1009 or later.

 

 

-39. I have CR 8.5 Installed. How come I cannot export reports with your cr85viewer or the viewer program I built? 

 

A: To correct the CR 8.5 export problem you need to have two updated dll files on your or your client computers and registered them with regsvr32:

crtslv.dll version 8.6.1.252 or later
exportmodeller.dll version 8.6.1.37 or later

These two files can be found in Program Files\Common Files\Crystal Decisions\2.0 folder after you install one of the Crystal Reports 8.5 Service Packs that can be downloaded at
http://resources.businessobjects.com/support/additional_downloads/service_packs/crystal_reports_en.asp#CR85

 

-40. The converter hung when I ran Access Whiz and I also got the "(4) Server has not yet been opened" and "(5) Subscript out of range" error messages when I ran testcr85.mdb/testcr11.mdb. What should I do? 

 

A:  You need to provide User ID and Password in the connection string if you are using Access Workgroup. You can also simply turn off the workgroup logon before you use Access Whiz.

 

-41. I could not add any table to my new Crystal Report with the VB statement crxReport.Database.Tables.Add dbname, tablename. I am getting the error: File "" is not known database type. How can fix it? 

 

A:  You can replace that VB statement you used by the following statement to add a table:

crxReport.Database.AddOLEDBSource connectionstring, tablename

 

-42.  I use the Crystal Reports viewer control in my VB application. I am getting "Memory Full" error when I view more than one report. How can fix it? 

 

A:  You need modify your VB application and place your Crystal Reports viewer control on a second form. Refresh this second form before it is shown.

 

-43. The converter can only generate single column reports for mailing labels . How can I turn a single column report into a multiple column report? 

 

A:  You need to do the following steps manually since the section width is read only and cannot be changed by the converter:
1. Open the report and click Section Expert button on the Expert Tools toolbar.
Section Expert option is also under Format and Report on the toolbar.
2. In the Section Expert, highlight Details, and check the checkbox for Format with Multiple Columns.
3. Click the Layout tab and set the Detail Size: Width (e.g. 2.525 in for 3 columns on a letter size report).
4. Set the Gap Between Details and then click OK.
Note: you may need to change the Page Setup and adjust the Left and Right Margins.

 

-44. How does the converter handle query/embedded query report record source? 

 

A:  After version 3.11.1026 the AccessToCR does not create new query for the embedded report record source. It sets the value of Crystal Report's SQLQueryString with the embedded query string. This way can eliminate the needs to upsize or maintain some of the queries in the backend database. Some of query report record sources are also replaced with SQL strings and some still use query as report record source. For example, the Invoice, Employee Sales by Country and Sales by Year reports of the Access northwind sample use the query record source but the converted Crystal Reports use the SQL string with tables instead. There is no need to port the Access queries Invoice, Employee Sales by Country and Sales by Year to the backend database.

 

-45. Can the report converter convert the reports in adp files or Access files using ODBC linked tables

 

A:  Yes, our AccessToCR version 3.12.0724 or later can convert those reports in adp files and Access files using ODBC linked tables. Access 2007/2010 reports using stored procedures need to use AccessToCR 10/11/11.5 or you can convert your stored procedures to views if you are using AccessToCR 8/8.5/9. For reports using ODBC linked tables the converter in the converter will automatically strip the table prefix such as dbo_ in the converted reports for you.

 

 

-46. I sometimes got run-time error: -214192187 file integrity error or -2147220992 error on the statement 'crxDatabase.AddOLEDBSource conn, tablename'. I tried many different connection strings but I could not fix the error. How can I fix it? 

 

A:  You need to check the second parameter tablename. You could get those errors if the tablename you specified was not in the database or was misspelled.

 

-47. I got Crystal Report Viewer errors "This field name is not known." and "Physical database not found." for some Northwind reports  when I used AccessToCR Previewer. How can I fix these problems?  

 

A:  Some required dll files for craxdrt.dll may be missing. You need to install a full version of RDC 8.5 or later or install one of Crystal Reports 8 - 11.5 Advanced/Developer Editions.  

 

-48. Where can I download the Service Packs of CR XI R1/R2?  

 

A:  You can find a handy list at http://victoriayudin.com/2009/05/25/crystal-reports-service-packs-and-versions/.

 

 

 

Back to Top
 Microsoft Visual Basic 6.0  

- 1. How can fix "Property Picture could not be set" or "Invalid Image" when I run my converted VB6 project?

 

A: The converter AccessToVB6 may not be able to save correct frx files.  You will need to run the Access Pre Conversion Tool to restore any missing image files.

 

- 2. I got the compiler error "User-defined type not defined" when I compiled the converted northwind.vproj. How can fix it?

 

A: You can open the converted VB6 project and check the ActivateX Data library references that you have.

Microsoft ActiveX Data Objects Library 2.0 uses "ADODB.Recordset". 
Microsoft ActiveX Data Objects Library 2.1 or later use "ADODB.Recordset20". 

You can just use the VB6 replace command to change all the "pRecordset As ADODB.Recordset20" to "pRecordset As ADODB.Recordset". You can also download and install the latest ADO from Microsoft web site and add the correct ADO reference if you don't have any ADO Library 2.1 or later on your computer. 

 

You can also try the solutions suggested by the article at http://support.microsoft.com/kb/193326.

 

- 3. Will your AccessToVB6 converter help me to convert my code-intensive Access file to VB .NET?

 

A: Yes, it will help to convert your intensive VBA code to VB .Net because VB6 code is closer to Access VBA and you can take advantages of Microsoft Visual Studio Upgrade Wizard. Many of our ANETVB7/ANETVB8 customers also purchased AccessToVB6 with their ANETVB7/ANETVB8 order.

 

-4. The widths and heights of the converted tabs and the datagrids are too small. What can I do?

 

A: Please download our update patch dated 8-27-2007 or later or manually adjust the size of the converted tabs/datagrids when the forms are in design view.

 

-5. AccessToVB6 generates two vbp files and a vbg file if the Access database contains continuous form. I had problems to load the compiled ocx component after I opened the vbp file for forms. What should I do? 

 

A: AccessToVB6 runs the ctl project file to build the ocx file at the end of the conversion process. You will need to rebuild the ocx if you make any changes to the ctl files. In order to load the compiled ocx file properly you have to run the VB6 project group vbg file. When you open the converted continuous form VB6 will rearrange the form objects based on their positions. The data source property of the datarepeater control will be automatically dropped because the datPrimaryRS information is placed at the bottom of the form. You will need to manually add the data source datPrimaryRS to each datarepeater control.   

 

-6. What should I do with the error message "Ambiguous name detected: ContactName" when I tried to build the converted northwind project for the ocx file? 

 

A: You need to download our update patch to get the AccessToVB6 v2.1.0531 or later. Some early versions of AccessToVB6 used the same Attributes VB_MemberFlags and VB_UserMemId for Property Gets.

 

- 7. How can I make DoCmd.Setwarings to work in VB6? 

 

A: Here is an example to convert DoCmd.SetWarnings.

VBA:
DoCmd.SetWarnings False
DoCmd.RunSQL strsql
DoCmd.SetWarnings True

VB6:
Call DoCmdSetWarnings(False)
Call DoCmdRunSQL(strsql)
Call DoCmdSetWarnings(True)

Note: the code in DoCmdSetWarnings generated by AccessToVB6 may not turn the warnings on or off for RunSQL. 

In order to make the above VBA code to work one can manually change the converted VB6 code to one of the following conversions:

VB6 - option 1: 

Public warnings As Boolean
...

Sub DoCmdSetWarnings(onoff As Boolean)
warnings = onoff
End Sub
Sub DoCmdRunSQL(strsql As String)
Dim appAccess As Object
On Error Resume Next
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase (dbname)
appAccess.SetWarnings warnings
appAccess.DoCmd.RunSQL strsql
appAccess.SetWarnings warnings
appAccess.CloseCurrentDatabase
appAccess = Nothing
End Sub

VB6 - option 2: (no warnings with Execute)

Dim appAccess As Object
On Error Resume Next
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase (dbname)
appAccess.Execute strsql
appAccess.CloseCurrentDatabase
appAccess = Nothing

VB6 - option 3:

Dim appAccess As Object
On Error Resume Next
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase (dbname)
appAccess.SetWarnings False
appAccess.DoCmd.RunSQL strsql
appAccess.SetWarnings True
appAccess.CloseCurrentDatabase
appAccess = Nothing

VB6 - option 4: 

Public appAccess As Object
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase (dbname)
...
Call DoCmdSetWarnings(False)
Call DoCmdRunSQL(strsql)
Call DoCmdSetWarnings(True)
...
appAccess.CloseCurrentDatabase
appAccess = Nothing
...

Sub DoCmdSetWarnings(onoff As Boolean)
On Error Resume Next
appAccess.SetWarnings warnings
End Sub
Sub DoCmdRunSQL(strsql As String)
On Error Resume Next
appAccess.DoCmd.RunSQL(strsql)
End Sub

VB6 - option 5: 

Public appAccess As Object
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase (dbname)
...
appAccess.DoCmd.SetWarnings(False)
appAccess.DoCmd.RunSQL(strsql)
appAccess.DoCmd.SetWarnings(True)
...
appAccess.CloseCurrentDatabase
appAccess = Nothing
...

 


 Credits 


- 1. Special thanks to Adam Cogan, Sydney.

 

Thanks go to Adam Cogan (one of two Microsoft Regional Directors in Australia) who presented our tool in his  

 

·   Tech Ed sessions in Australia, Africa and New Zealand
·  
Microsoft Access to .NET Roadshow

We would also like to express our gratitude to Adam for all his constructive feedback to improve our products.

 


- 2.  Special thanks to Mark Johnson, Berlin and many our customers.

 

We would like to thank Mark Johnson, Berlin Germany and many our customers for all their useful suggestions

Back to Top

 
 
 
Sample DAO Converted Code
 
Access:

 

   Dim qd As Object
  Set qd = CurrentDb.CreateQueryDef("",  "DELETE Shippers.* FROM Shippers where ShipperID=3")
  qd.Execute
  Set qd=Nothing

 

Converted VB .NET code (DAO):

 

   Dim CurrentDb_ As String="C:\northwind\northwind.mdb"
  Dim DAODBEngine_definst As New DAO.DBEngine
  Dim CurrentDb As DAO.Database
  Dim qd As Object
  CurrentDb = DAODBEngine_definst.OpenDataBase(CurrentDb_)
  qd = CurrentDb.CreateQueryDef("",  "DELETE Shippers.* FROM Shippers where ShipperID=3")
  qd.Execute
  qd = Nothing
  CurrentDb.Close

 

Converted ASP .NET code using an ANETVB generated routine:

 

  Call ExecuteSQL("DELETE Shippers.* FROM Shippers where ShipperID=3")
 
  where ExecuteSQL is an ANETVB generated routine.

 

Access:

 

Private Sub Add_Click()
  Dim db As DAO.Database
  Dim rs As DAO.Recordset
  On Error GoTo Add_Error
  Set db = CurrentDb
  Set rs = db.OpenRecordset("Contacts")
  rs.AddNew
  rs!ID = Val(txtID.Value)
  rs!FirstName = txtFirstName.Value
  rs!LastName = txtLastName.Value
  rs.Update
  rs.Close
  MsgBox "New record added!"
  Exit Sub
Add_Error:
  MsgBox Err.Description
  Resume Next
End Sub
Private Sub Search_Click()
  Dim db As DAO.Database
  Dim rs As DAO.Recordset
  On Error GoTo Search_Error
  Set db = CurrentDb
  Set rs = db.OpenRecordset("Contacts", dbOpenDynaset)
  rs.FindFirst "[ID] = " & txtID.Value
  txtFirstName.Value = rs!FirstName
  txtLastName.Value = rs!LastName
  rs.Close
  Exit Sub
Search_Error:
  MsgBox Err.Description
  Resume Next
End Sub

 

AccessToVB6 Converted code:

 

Private Sub Add_Click()
  Dim db As DAO.Database
  Dim rs As DAO.Recordset
  On Error GoTo Add_Error
  Set db = OpenDatabase("C:\testdao.mdb")
  Set rs = db.OpenRecordset("Contacts")
  rs.AddNew
  rs!ID = Val(txtID.Text)
  rs!FirstName = txtFirstName.Text
  rs!LastName = txtLastName.Text
  rs.Update
  rs.Close
  MsgBox "New record added!"
  Exit Sub
Add_Error:
  MsgBox Err.Description
  Resume Next
End Sub
Private Sub Search_Click()
  Dim db As DAO.Database
  Dim rs As DAO.Recordset
  On Error GoTo Search_Error
  Set db = OpenDatabase("C:\raed\testdao.mdb")
  Set rs = db.OpenRecordset("Contacts", dbOpenDynaset)
  rs.FindFirst "[ID] = " & txtID.Text
  txtFirstName.Text = rs!FirstName
  txtLastName.Text = rs!LastName
  rs.Close
  Exit Sub
Search_Error:
  MsgBox Err.Description
  Resume Next
End Sub

 

ANETVB8 Converted code (DAO):

 

Dim DAODBEngine_definst As New DAO.DBEngine

Sub Add__Click(sender As Object, e As System.EventArgs) Handles Add_.Click
  Dim db As DAO.Database
  Dim rs As DAO.Recordset
  On Error GoTo Add_Error
  db = DAODBEngine_definst.OpenDatabase(Configuration.ConfigurationSettings.AppSettings("DataFile"))
  rs = db.OpenRecordset("Contacts")
  rs.AddNew
  rs.Fields("ID").Value = Val(txtID.Text)
  rs.Fields("FirstName").Value = txtFirstName.Text
  rs.Fields("LastName").Value = txtLastName.Text
  rs.Update
  rs.Close()
  MsgBox("New record added!")
  Exit Sub
Add_Error:
  MsgBox(Err.Description)
  Resume Next
End Sub
Sub Search_Click(sender As Object, e As System.EventArgs) Handles Search.Click
  Dim db As DAO.Database
  Dim rs As DAO.Recordset
  On Error GoTo Search_Error
  db = DAODBEngine_definst.OpenDatabase(Configuration.ConfigurationSettings.AppSettings("DataFile"))
  rs = db.OpenRecordset("Contacts", DAO.RecordsetTypeEnum.dbOpenDynaset)
  rs.FindFirst ("[ID] = " & txtID.Text)
  txtFirstName.Text = rs.Fields("FirstName").Value
  txtLastName.Text = rs.Fields("LastName").Value
  rs.Close()
  Exit Sub
Search_Error:
  MsgBox (Err.Description)
  Resume Next
End Sub

 

ANETVB8 Converted code (OleDb):


Sub Add__Click(sender As Object, e As System.EventArgs) Handles Add_.Click
  Dim db As OleDbConnection
  Dim rs_da As OleDbDataAdapter, rs_ds As DataSet, rs_dt As DataTable, rs_rows As DataRow()
  Dim rs_cb As OleDbCommandBuilder
  Dim rs As DataRow
  On Error GoTo Add_Error
  db = New OleDbConnection(Configuration.ConfigurationSettings.AppSettings("ConnectionString"))
  db.Open()
  rs_da = New OleDbDataAdapter("SELECT * FROM [" & "Contacts" & "]", db)
  rs_ds = New DataSet
  rs_da.Fill(rs_ds, 0)
  rs_dt = rs_ds.Tables(0)
  rs = rs_dt.NewRow()
  rs("ID") = Val(txtID.Text)
  rs("FirstName") = txtFirstName_.Text
  rs("LastName") = txtLastName_.Text
  rs_dt.Rows.Add(rs)
  rs_cb = New OleDbCommandBuilder(rs_da)
  rs_da.Update(rs_ds, 0)
' rs.Close()
' rs = Nothing
  db.Close()
  MsgBox("New record added!")
  Exit Sub
Add_Error:
  MsgBox(Err.Description)
  Resume Next
End Sub
Sub Search_Click(sender As Object, e As System.EventArgs) Handles Search.Click
  Dim db As OleDbConnection
  Dim rs_da As OleDbDataAdapter, rs_ds As DataSet, rs_dt As DataTable, rs_rows As DataRow()
  Dim rs__cb As OleDbCommandBuilder
  Dim rs As DataRow
  On Error GoTo Search_Error
  db = New OleDbConnection(Configuration.ConfigurationSettings.AppSettings("ConnectionString"))
  db.Open()
  rs_da = New OleDbDataAdapter("SELECT * FROM [" & "Contacts" & "]", db)
  rs_ds = New DataSet
  rs_da.Fill(rs_ds, 0)
  rs_dt = rs_ds.Tables(0)
  rs_rows = rs_dt.Select("[ID] = " & txtID.Text)
  rs = rs_rows(0)
  txtFirstName_.Text = rs("FirstName")
  txtLastName_.Text = rs("LastName")
' rs.Close()
' rs = Nothing
  db.Close()
  Exit Sub
Search_Error:
  MsgBox(Err.Description)
  Resume Next
End Sub

Back to Top
 
 
 
 
 
 
 
 
Access Conversion Toolset, Access Converters, Access to .NET, Access to ASP.NET, Access to VB .NET, Access to C#, Access to J#, Access to VB6, Access to Crystal Reports, Access to Web Forms, Access to Windows Forms, Access to Web Services, Access Conversions, VBA to VB .NET, VBA to C#, VB .NET to C#
© Copyright 2001-2022 Microtools.us All Rights Reserved.
              Access Conversion Toolset, Access Converters, Access to .NET, Access to ASP.NET, Access to VB .NET, Access to C#, Access to J#, Access to VB6, Access to Crystal Reports, Access to Web Forms, Access to Windows Forms, Access to Web Services, Access Conversions, VBA to VB .NET, VBA to C#, VB .NET to C# © Copyright 2001-2024 Microtools.us All Rights Reserved.