473,910 Members | 5,613 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 1249
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
3917
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
24046
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 tried to update the links by changing the Connect property and refreshing: Set td = db.TableDefs(0)...
11
4550
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 on a single form, and be updatable. I have created a query which includes all 8 tables, and then...
59
3701
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 (regardless of whether some people feel it is appropriate or not). So the issue I and considering...
0
10921
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
11055
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
10541
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
9727
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...
1
8099
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7250
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
5939
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
6142
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4337
muto222
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.