473,657 Members | 2,556 Online
Bytes | Software Development & Data Engineering Community
+ 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).at tributes 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 3379
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).at tributes 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_SCH EMA.COLUMNS " & _
" WHERE TABLE_NAME='Tab le1'"
set rs = conn.execute(sq l)
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.goo gle.com...
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).at tributes 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
2747
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 at -1 and 0 respectively. Unless I specifically set the table field's defaultvalue to Null, the form comes up with an automatic value of 0 in the control? The control has NO default value property setting. Why is that?
30
4567
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 corresponding field in the lookup table. In my data table we store the ID in what I will call the 'key' field. == Description of the desired operation:
10
39003
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 records. Can any of you experts out there help me with a sample SQL.
3
2016
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 adapters ; you know those clever little things which allow you to contrsuct methods for manipulating data use this. So a method might be declared someting like this. Private Sub myMethod(ByVal myYear As System.Nullable(Of Integer), ByVal...
2
3800
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 get set(ByVal Value as Nullable(Of Int16)) If not _MyProp.Equals(value) then
2
7926
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 = typeof(Iandmed); ConstructorInfo c = t.GetConstructors();
4
6413
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
1177
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; Console.WriteLine(result); // This display 8 Console.WriteLine(result.Value); // This also display 8 the same
4
2186
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 have a nullable field in the struct. can anyone please help me out regarding this
0
8397
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
8310
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
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
8503
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
8605
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
7333
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4158
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1620
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.