473,703 Members | 2,660 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannon Create a column of type "adBoolean" via ADOX

Hello !

Can anyone reproduce this? I am using WinXP SP1 (MDAC 2.8) with MSVS 2003.
I can create a complete database with ADOX and everything works, however if
I try to add a Datatype adBoolean the program raises an exception without
any information :(

I am adding all of the columns the same way, its only the boolean type
which gives the problems:

//dtTable is created elsewhere...
ADOX.Column adxCol=new ADOX.Column()
adxCol.Attribut es=ADOX.ColumnA ttributesEnum.a dColNullable;
adxCol.Name="Bl ahblah";
adxCol.Type=ADO X.DataTypeEnum. adBoolean;
adxTable.Column s.Append(adxCol ,ADOX.DataTypeE num.adBoolean,0 );

as soon as I add this column to the adxTable it crashes?

Thanks in advance,
Oliver
Nov 15 '05 #1
1 4571
oldBoy
1 New Member
Oliver,

Hi. adBoolean columns can't be NULLABLE in ADOX. Comment out the adxCol.Attribut es line. Also, remove the defined size of 0 in the append line. If you need to send a value, send System.Reflecti on.Missing.Valu e instead.

Hope this helps.
Apr 27 '06 #2

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

Similar topics

39
2899
by: Scotter | last post by:
Okay I think my title line was worded misleadingly. So here goes again. I've got quite 20 identical MDB files running on an IIS5 server. From time to time I need to go into various tables and add a field or two. It would be great if there were an application out there that could either: (a) sync all MDB designs (and/or data) designated to match one I've added some fields/tables to OR (b) go into all designated MDBs and create new...
9
2483
by: Mike | last post by:
adLongVarChar to 'text' - Mapping ADO types to Native Access types? Okay, so it's not the job of Access to map these types, but has anybody, in the existance of this world ever figured out how to do so? Does anyone have code that they can share that can correctly map ADO/ADOX types to the native Access Types, correctly distinguishing between say 'text' and 'memo'? Even if the routine needs more meta data from say ADOX such as length,...
4
2272
by: dave | last post by:
I need to add a column to a table using code. The following works, but only for a new table. How should I change this to alter an existing table? Dim strConn Dim Catalog As New ADOX.Catalog Dim Table As ADOX.Table
18
2461
by: Ken Kazinski | last post by:
Does anyone know of a good example for creating a access database and then tables within that database. All the examples I have found so far use a SQL database. Thanks, Ken
0
1602
by: JDMils | last post by:
I am having trouble finding the AutoNumber field of my database with this code. The code is used to replicate a specific table, reproducing all columns including indexes and Primary Keys (there is a good reason to do it this way), but I can not detect the columns which are Primary Keys as I cycle thru the column collection Can someone pls help me? ADOCatODBC = New ADOX.Catalog
3
3559
by: Miro | last post by:
Something weird I have run into when trying to add a boolean field to an Access table by code. -Just wondering if anyone else has run into this. ( vb.net 2005 express ) If I add any other field other than boolean the "command" version of adding a field works great. But if I try to add a boolean field, I get an exception error when its trying to be added, so instead I have to use the function meathod. -Code is below.
0
8749
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9243
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9002
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5922
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2434
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2057
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.