473,320 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Trying to Create an Access DB File

I am trying to create an Access 2000 database using VB.NET. I found the code
below via a google search but when I run it I always get an error.
I do have a reference to Microsoft ADO Ext. 2.7 for DDL and Security. The
path and file name are valid. Any thoughts on how to debug this?

If I use the Command window to try to find out what the error is I get
messages like this
?Excep.ErrorCode

'Excep.ErrorCode' is not declared or the module containing it is not loaded
in the debugging session.

==================== Code ====================

Public Function CreateAccessDatabase(ByVal DatabaseFullPath As String) As
Boolean

Dim bAns As Boolean

Dim cat As New ADOX.Catalog

Try

Dim sCreateString As String

sCreateString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
DatabaseFullPath

cat.Create(sCreateString)

bAns = True

Catch Excep As System.Runtime.InteropServices.COMException

bAns = False

Finally

cat = Nothing

End Try

Return bAns

End Function
Nov 21 '05 #1
2 1296
Wayne,

I see not direct errrors, I thought that it is the same as the code I use
what is beneath. .

set a reference to COM adox ext 2.x for dll and security
\\\
Dim catNewDB As New ADOX.Catalog
catNewDB.Create("Provider=Microsoft.Jet.OLEDB.4.0; " & "Data
Source=C:\db1.mdb")
///
I hope this helps a little bit?

Cor
Nov 21 '05 #2
Thanks for the response Cor. It is interesting that this morning my routine
seems to work but your code triggers an error that installable ISAM could
not be found? Life is never dull, eh?

Wayne

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:OW**************@tk2msftngp13.phx.gbl...
Wayne,

I see not direct errrors, I thought that it is the same as the code I use
what is beneath. .

set a reference to COM adox ext 2.x for dll and security
\\\
Dim catNewDB As New ADOX.Catalog
catNewDB.Create("Provider=Microsoft.Jet.OLEDB.4.0; " & "Data
Source=C:\db1.mdb")
///
I hope this helps a little bit?

Cor

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: fritz | last post by:
Trying to get at mysql. I installed mysql on two separate machines and am unable to access either one. On the first I couldn't put it on C: because that was a limited DOS drive. So here is the...
3
by: SQLScott | last post by:
Forgive me if this seems trivial but I cannot seem to find an answer. For testing purposes, one of my methods in my Web Service writes to a file (at least tries). I am using the following line of...
1
by: intl04 | last post by:
I am getting strange print-related error messages when trying to create (not print!) reports. For example, when I click 'new' to create a report then choose 'design view', I get an error message...
9
by: Albretch | last post by:
.. I am trying to create a database in a MS Access DB via JDBC drivers. I have tried both sun.jdbc.odbc.JdbcOdbcDriver and ids.sql.IDSDriver From some reason both drivers Exceptions tell me...
3
by: Les Desser | last post by:
In A97 I am trying to determine some attributes of files in a folder - Date, time, file size and file name. To this end I have managed to create a batch file to do a Dir to a work file (and then...
6
by: Frank Wilson | last post by:
Tom, It sounds to me like ASP, not ASP.NET is handling the request for WebForm1.aspx. This is most likely an IIS config issue that may have been caused by order of installation or...
12
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
0
by: UJ | last post by:
I am trying to write a routine to upload a file through a web service to our server. I've enclosed the following code and when I run it I get an error: Exception Occurred. Error: Logon failure:...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.