473,581 Members | 2,233 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tables.CanRemov e

I'm doing this:

if ((this.Tables.C ontains(dt.Tabl eName)) & (this.Tables.Ca nRemove(dt)))
{
this.Tables.Rem ove(dt);
}

and my table is not being removed. Which is fine, I guess. The things
is, I don't know why.

I have confirmed that it is the second portion of the boolean that's
saying no to my request (and, yes, the first portion is returning true).

So what are the possible reasons for CanRemove returning false? By what
criteria does its algorithm evaluate the question?
Nov 28 '05 #1
4 1236
C Glenn,

It's possible that there are constraints on a column which depend on a
column in the table you are trying to remove. You would have to remove
these constraints first, and then you could remove the table.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"C Glenn" <no****@domain. com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
I'm doing this:

if ((this.Tables.C ontains(dt.Tabl eName)) & (this.Tables.Ca nRemove(dt)))
{
this.Tables.Rem ove(dt);
}

and my table is not being removed. Which is fine, I guess. The things
is, I don't know why.

I have confirmed that it is the second portion of the boolean that's
saying no to my request (and, yes, the first portion is returning true).

So what are the possible reasons for CanRemove returning false? By what
criteria does its algorithm evaluate the question?

Nov 28 '05 #2
Just to make sure - you did actually use '&&' and not '&' in your code
right?
if ((this.Tables.C ontains(dt.Tabl eName)) & (this.Tables.Ca nRemove(dt)))
{
this.Tables.Rem ove(dt);
}
--
Adam Clauss

"C Glenn" <no****@domain. com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. I'm doing this:

if ((this.Tables.C ontains(dt.Tabl eName)) & (this.Tables.Ca nRemove(dt)))
{
this.Tables.Rem ove(dt);
}

and my table is not being removed. Which is fine, I guess. The things
is, I don't know why.

I have confirmed that it is the second portion of the boolean that's
saying no to my request (and, yes, the first portion is returning true).

So what are the possible reasons for CanRemove returning false? By what
criteria does its algorithm evaluate the question?

Nov 28 '05 #3
No! I used '&'. Thanks for the tip. I looked up '&&' and will use it
in situations like this in future.

Adam Clauss wrote:
Just to make sure - you did actually use '&&' and not '&' in your code
right?

if ((this.Tables.C ontains(dt.Tabl eName)) & (this.Tables.Ca nRemove(dt)))
{
this.Tables.R emove(dt);
}


Nov 28 '05 #4
Absolutely no constraints of any kind.
Nicholas Paldino [.NET/C# MVP] wrote:
C Glenn,

It's possible that there are constraints on a column which depend on a
column in the table you are trying to remove. You would have to remove
these constraints first, and then you could remove the table.

Hope this helps.

Nov 28 '05 #5

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

Similar topics

44
3853
by: Mariusz Jedrzejewski | last post by:
Hi, I'll be very grateful if somebody can explain me why my Opera 7.23 (runing under linux) doesn't show me inner tables. Using below code I can see only "inner table 1". There is no problem with other browsers (I checked it under Konqueror). Thank you in advance for your help. Regards. /Mariusz <HTML>
3
24014
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked tables in the database where the code resides. If we move the database with the data tables to a new directory, the links are no longer valid. I...
11
4510
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my database,just help in getting me pointed in the right direction. I have a database with 8 tables, which from what I have read, cannot be linked...
59
3637
by: phil-news-nospam | last post by:
In followups by Brian O'Connor (ironcorona) to other posts, he repeats the idea that using tables in CSS is not something that should be done because IE doesn't support it. Of course I'm not happy about the fact that IE doesn't support CSS tables. But what can one do about that? And tables of one type or the other are needed in some cases...
0
7868
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...
0
8149
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. ...
0
8304
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...
0
8175
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...
0
6553
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...
0
3805
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...
0
3827
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1403
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1138
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...

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.