|
-
Mar 24th, 2004, 09:58 PM
#1
Thread Starter
New Member
Add Field to Access DB in C# .Net
I have an access DB that I want to add a new field to a table in C#.Net
Previously I have been doing this by creating an OLEDB Connection and running the ALTER TABLE SQL statement. This works fine.
But now I want to set some of the properties of the field (Allow Zero Length, Required, Default Value, Unicode Compression etc).
And haven't yet been able to find a way to do this.
Can anyone out there help me!!
-
Mar 25th, 2004, 11:39 AM
#2
Sleep mode
The only way I could found is by utilizing ADOX library . Here's an example in VB.NET(didn't have time to port it to C#) .It creates new blank database with all the fields and the settings you choose . Have a look at the ADOX.DataTypeEnum (if I still remember the name correctly) .http://www.vbforums.com/showthread.p...hreadid=251384
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|