473,472 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Cannot Get Field Nullable Property

Hi

I am using asp/vbscript/ado/mssql.

I am able to get the nullable property OK when generating a recordset
with a simple SQL statement such as "select Fld1,Fld2 from Table1" and
then looping thro' the fields and :-

Response.Write(rs.fields(x).attributes and adFldIsNullable)

When I use the following statement all fields are erroneously reported
as nullable:-

"Select B.Fld2, B.Fld3 From Table1 A Left Join Table2 B On
A.Fld1=B.Fld1"

Is this normal?
Jul 19 '05 #1
2 3367
This recordset may not even be updatable, and you're worried about whether
or not the fields are nullable?

If you set the Unique Table dynamic property, you may get the true results
for the fields. You can only set this property if you use a client-side
cursor (adUseClient). I have no idea if this will work. I've never tried to
update a recordset whose source was a multi-table select statement.

Bob Barrows

Paul Eaton wrote:
Hi

I am using asp/vbscript/ado/mssql.

I am able to get the nullable property OK when generating a recordset
with a simple SQL statement such as "select Fld1,Fld2 from Table1" and
then looping thro' the fields and :-

Response.Write(rs.fields(x).attributes and adFldIsNullable)

When I use the following statement all fields are erroneously reported
as nullable:-

"Select B.Fld2, B.Fld3 From Table1 A Left Join Table2 B On
A.Fld1=B.Fld1"

Is this normal?

Jul 19 '05 #2
Do you need to get the *data* in order to get the metadata? How about
grabbing the column names and whether they are NULL or not from the I_S
view:

sql = "SELECT COLUMN_NAME, IS_NULLABLE " & _
" FROM INFORMATION_SCHEMA.COLUMNS " & _
" WHERE TABLE_NAME='Table1'"
set rs = conn.execute(sql)
do while not rs.eof
response.write rs(0) & " nullable? " & rs(1) & "<br>"
rs.movenext
loop

"Paul Eaton" <pe****@pt.lu> wrote in message
news:13**************************@posting.google.c om...
Hi

I am using asp/vbscript/ado/mssql.

I am able to get the nullable property OK when generating a recordset
with a simple SQL statement such as "select Fld1,Fld2 from Table1" and
then looping thro' the fields and :-

Response.Write(rs.fields(x).attributes and adFldIsNullable)

When I use the following statement all fields are erroneously reported
as nullable:-

"Select B.Fld2, B.Fld3 From Table1 A Left Join Table2 B On
A.Fld1=B.Fld1"

Is this normal?

Jul 19 '05 #3

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

Similar topics

10
by: MLH | last post by:
I have an A97 table with a Yes/No field named TowJob and a form bound to that table. The TowJob control on the form is bound to the same field. It is an option group with Yes and No bttns valued...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
10
by: satishrajana | last post by:
Hi, My SQL returns a NULL in a datefield if there is no date in that field. If there is a NULL in this column, I want to replace it with spaces in my SELECT statement when I am selecting these...
3
by: Goofy | last post by:
The 2.0 Framework has a new type called System.Nullable. This allows something to Not exist, basically you can pass 'Nothing' to a method whose parameters as System.Nullable. Im looking at table...
2
by: Rick | last post by:
I have a business object (class) with some nullable properties declared like this: Private _MyProp as Nullable(of Int16) public Property MyProp as Nullable(Of Int16) get Return _MyProp end...
2
by: Andrus | last post by:
My type contains constructor with nullable parameter like public class Iandmed { public Iandmed(DateTime? miskuup) {} } I tried to get its constructor parameter type name using Type t =...
4
by: Aamir Mahmood | last post by:
Hi I am unable to access the HasValue and Value properties in an Nullable object. int? i = 9; object value = i; if ((value as Nullable).HasValue) { ... }
2
by: Tony Johansson | last post by:
Hello! What purpose has this Value propery on nullable types because it possible to display their value without using it. For example: int? intNullable1 = 3; int? intNullable2 = 5;...
4
by: James | last post by:
hello, can we have a nullable type field in the struct ? struct Employee { nullable<stringfirstName =null; } we can't initialize a field in a struct so is there any possibility that we can...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.