473,686 Members | 2,783 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

delete a table in an external database

hi NG

I have got a database, and from this database I want to delete a table in
another database, before Iexport a new table to that other database.

My question is how can I delete a table in a forein database?

Thx in advance
Tony
Nov 12 '05 #1
5 14644
Tony wrote:
hi NG

I have got a database, and from this database I want to delete a table in
another database, before Iexport a new table to that other database.

My question is how can I delete a table in a forein database?


air code:

dim db as database
set db=opendatabase (yourwhatever)
db.execute "drop table yourtable"
db.close
set db=nothing

--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #2
I would probably simply use

DROP TABLE [External_DB_Pat h_and_Filename].Tablename

in an action query or code. No need for opening connections explicitly.
Pavel

Bas Cost Budde wrote:

Tony wrote:
hi NG

I have got a database, and from this database I want to delete a table in
another database, before Iexport a new table to that other database.

My question is how can I delete a table in a forein database?


air code:

dim db as database
set db=opendatabase (yourwhatever)
db.execute "drop table yourtable"
db.close
set db=nothing

--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #3
Pavel Romashkin wrote:
I would probably simply use

DROP TABLE [External_DB_Pat h_and_Filename].Tablename


Interesting! Does CREATE TABLE do that, too?

--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #4
It does. Give it a shot.
In fact, if you use QBE to create a table in external DB, this is kind
of SQL you see in the SQL view.

Pavel

Bas Cost Budde wrote:

Pavel Romashkin wrote:
I would probably simply use

DROP TABLE [External_DB_Pat h_and_Filename].Tablename


Interesting! Does CREATE TABLE do that, too?

--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #5
Thx a lot guys

"Pavel Romashkin" <pa************ *@hotmail.com> skrev i en meddelelse
news:40******** *******@hotmail .com...
It does. Give it a shot.
In fact, if you use QBE to create a table in external DB, this is kind
of SQL you see in the SQL view.

Pavel

Bas Cost Budde wrote:

Pavel Romashkin wrote:
I would probably simply use

DROP TABLE [External_DB_Pat h_and_Filename].Tablename


Interesting! Does CREATE TABLE do that, too?

--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #6

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

Similar topics

1
3332
by: Martin_Hurst | last post by:
Is it possible to establish a connection from within a postgres database to another external database on the network, i.e., not a java or scripting connection, BUT by some type of table definition within the postgres database of that external database table source - something similar to a proxy definition. Examples of external database could be MSAccess, Oracle, Sybase, MSQLServer, etc. The idea behind this would to be able to at least...
0
2447
by: aleatory | last post by:
Hi Access gurus, I've been scratching my head to find a solution to the problem. I'm trying to read tables created in Paradox 7.x into Access 2002; however, Access keeps giving me an "External Database Driver 11265" error. Looking at the "ODBC Data Source Administrator"
1
2230
by: u473 | last post by:
I need to go over the hurdle of the connectivity syntax of ADO vs DAO. I want to loop thru each record of table "A" in the current database "X" If condition is true in field "Y" modify field "Z" Append this record and all its fields to table "B" Else
0
1620
by: jj | last post by:
Hi I'm exporting a module to a new database from VBA - I would like to convert it to an MDE-file, but have found out that i must be from a access2000 to work - therefore instead I would like to password protect my modules in the external database (automatically from VBA), but I don't know how to do it? TIA JJ
4
3190
by: kcopson | last post by:
I need a routine to add a new field to an existing table in a database that is in another town. Situation: I maintain a database with 10 copies in different offices. Everytime we want to make a change or addition to a table's structure, someone has to physically go out to each office and make the change. Each database copy has it's own unique data, with tables links to other tables within the database, so we can't just simply send a new...
2
13415
by: Scott | last post by:
I have a macro set up to delete a table and then it imports an up-to-date copy of the table. Every once in a while the table gets deleted but the new one isn't imported, I assume the user is closing the database before the macro finishes running. The next time the macro runs it comes up with an error becuase the delete table part of the macro can't find the table. Is there any way to have the macro check to see if the table is there and...
1
14170
by: vspargo | last post by:
I'm trying to add a field to a secured external database using VBA (it's the back end of the one the code is running in). Both databases are Access 2002 OS=Windows XP. The error tells me I'm using an incorrect Account Name or Password, but they are correct. cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" &_ "Data Source=c:\...\Data.mdb;Jet OLEDB:System Database="&_ "c:\...\Secured.mdw;UserID=Me;Password=abc;" The rest of...
5
9465
by: Ian | last post by:
I am trying to: 1. Open a form on the external database 2. Enter a value in a text box on that form I have 1 above working OK using module form “The Access Web”, the module looks like this: ************ Code Start ************* ' This code was originally written by Dev Ashish.
2
2125
by: Kenxo | last post by:
Hello, I am new at scripting and having some problems with syntax on EXECUTE cmd I was traying to reset the primary key on an access db table but I thought it was easier to delete the table and recreate it again. the following code fails on the last line which is supposed to delete the table. It seems like it is missing a parameter but I am not sure what. Set cnxAccess = CreateObject("ADODB.Connection") cnxAccess.Open...
1
2129
by: mfaisalwarraich | last post by:
Hi Everybody, I have an external database called Patients.mdb where i made a query called qryAdmissionDetails. now i want to run this query on a report of another database called PatientDetails.mdb. how i can do this? can this be done by setting the recrodset of a continuous form to the recordset of qryAdmissionDetails and then printing that continous forms to a report? please tell me how i can do this. code for setting the recordset of...
0
8585
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
8517
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
9057
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8933
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
6440
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
4309
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
4534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2947
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 we have to send another system
2
2206
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.