473,396 Members | 1,712 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,396 software developers and data experts.

Programatically checking Allows Null property of a column

SQL such as the following returns the Allows Null property of a column in SQL Server:
Expand|Select|Wrap|Line Numbers
  1. select is_nullable from information_schema.columns where 
  2.   table_name = 'TheTableName' and 
  3.   column_name = 'TheColumnName'
  4.  
I need to do the same in MS Access and have tried the following:
Expand|Select|Wrap|Line Numbers
  1. select ColumnProperty( Object_ID('TheTableName'), 'TheColumnName',
  2. 'AllowsNull')
I get the error: 'Undefined function ColumnProperty in expression'.

I am programming in Delphi (using a TADOQuery) with an Access97 database.

Any clues would be much appreciated.
Oct 9 '07 #1
3 1540
RedSon
5,000 Expert 4TB
Maybe the nice folks in mySQL can be of assistance. To the folks in mySQL, let me know if I should have moved it elsewhere ;-)
Oct 9 '07 #2
pbmods
5,821 Expert 4TB
Heya, bmcallister. Welcome to TSDN!

Please use CODE tags when posting source code:

[CODE=sql]
SQL code goes here.
[/CODE]

I'm going to go ahead and move this thread to the Access forum, where our resident Experts will be better able to help you out.
Oct 10 '07 #3
FishVal
2,653 Expert 2GB
Hi, there.

I'm not sure JetSQL supports something like you are expecting.
Here is example of how it may be done in VBA via Access object model.
Expand|Select|Wrap|Line Numbers
  1. Public Function GetFieldRequiredProperty(txtTable As String, _
  2.                                          txtField As String) As Boolean
  3.  
  4.     GetFieldRequiredProperty = _
  5.         CurrentDb.TableDefs(txtTable).Fields(txtField).Required
  6.  
  7. End Function
  8.  
Oct 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Wendy S | last post by:
I have this working, but I don't think it's done efficiently or the best way: <a href="javascript:setAllAccounts(true)">check all</a> <a href="javascript:setAllAccounts(false)">clear all</a> ...
0
by: CoreyMas | last post by:
Hello Everyone, I have been successful in creating a template column programatically using the examples provided in VS 2003. However I have not been able to programatically set the width of a...
7
by: Douglas Buchanan | last post by:
I cannot access certain column values of a list box using code. I have a list box 'lstPrv' populated by the query below. SELECT tblPrv.fkPrvID, lkpCat.CatNm, lkpSrv.SrvNm, lkpCat.pkCatID,...
99
by: Mikhail Teterin | last post by:
Hello! Consider the following simple accessor function: typedef struct { int i; char name; } MY_TYPE; const char *
5
by: Logan McKinley | last post by:
I was wondering if there is any way for me to read the device manager in my C# program? I have a program that crashes when some third party hardware is not installed or is set to the wrong port...
2
by: John | last post by:
Hi, heres a brief description of what I'm trying to do. I have a sql table named colors that looks like this: color_id color_name 1 blue 2 red 3......... and so...
7
by: Simon Verona | last post by:
I posted this in dotnet.languages.vb.controls but thought I'd post here as well.. I have a combobox that is bound to a dataview generated from a dataset. The dataset has a single table...
9
by: =?Utf-8?B?UGV0ZXJX?= | last post by:
I have a TabControl on a Windows form in which I have various tab pages each with a DataGridView, the first column of which is a DataGridViewCheckBoxColumn and subsequent columns being...
1
by: kannan1983 | last post by:
In a table i have to check each and every column for null values . if the column has null value i need to display as ' NULL VALUE' in the output , for these iam declaring some local variables Iam...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.