Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2005

Tip: Looking for answers? Try searching our database.

Create Access Database with ADOX

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason Chu - 01 Sep 2005 17:09 GMT
I'm using asp.net referencing ADOX to create access database on server side.
Using C#;

Two problems:
the ASPNET process doesn't let go of the access file, so I can't access it
after I've created the file.  I've set the ADOX.CatalogClass variable to
null, but it doesn't let go of it...is there a connection close command?

second problem, with one of my table create, I have a access YES/NO field.
when I have:
tableClients.Columns.Append("fldField" + i,DataTypeEnum.adBoolean,0);
then later on:
cat.Tables.Append((object)tableClients);
it gives me:
"Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if available. No work was done. "
else if I don't append that column, it runs fine.
what's wrong??

Thanx
Paul Clement - 02 Sep 2005 13:51 GMT
¤ I'm using asp.net referencing ADOX to create access database on server side.
¤ Using C#;
¤
¤ Two problems:
¤ the ASPNET process doesn't let go of the access file, so I can't access it
¤ after I've created the file.  I've set the ADOX.CatalogClass variable to
¤ null, but it doesn't let go of it...is there a connection close command?
¤

There should be a Close method for the ActiveConnection property of the Catalog object, although
I've seen instances where this doesn't appear to close the database.

           ADOXCatalog.ActiveConnection.Close()
           ADOXCatalog.ActiveConnection = Nothing

¤ second problem, with one of my table create, I have a access YES/NO field.
¤ when I have:
¤ tableClients.Columns.Append("fldField" + i,DataTypeEnum.adBoolean,0);
¤ then later on:
¤ cat.Tables.Append((object)tableClients);
¤ it gives me:
¤ "Multiple-step OLE DB operation generated errors. Check each OLE DB status
¤ value, if available. No work was done. "
¤ else if I don't append that column, it runs fine.
¤ what's wrong??

I can't repro this issue. Could it have something to do with your column name?

Paul
~~~~
Microsoft MVP (Visual Basic)
Jason Chu - 02 Sep 2005 14:05 GMT
Thanx.

I've ended up using SQL to create tables, so don't have the boolean problem
anymore.  

> ¤ I'm using asp.net referencing ADOX to create access database on server side.
> ¤ Using C#;
[quoted text clipped - 27 lines]
> ~~~~
> Microsoft MVP (Visual Basic)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.