473,385 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Creating and Modifying tables in a remote database

RWC
Hello,

I'm trying to do some updates on the fly in a remote database. I'd like to
do this with code. I'm running basically the following code;

Dim db As Database
Dim tblDefs As TableDefs
Dim tblDef As TableDef
Dim strCurrentDatabase As String

strCurrentDatabase = GetDatabase("desktop", "Find Database") 'Get Database
opens dialog box to locate the database

Set db = OpenDatabase(strCurrentDatabase)

For Each tblDef In db.TableDefs

DoCmd.Rename "TMP" & tblDef.Name, acTable, tblDef.Name

Next tblDef

This doesn't seem to work though, it's trying to rename the local link name,
if a link exists of the same name. Outside of just renaming a table out of
the way, I'd like to be able to add fields or modify field properties. Any
help would be appreciated. I'm using Access XP with SP2 installed on a
Windows XP pro machine.

If you reply to this posting via email, please remove the caps and
underscores.

Thanks in advance!
Rick
Nov 12 '05 #1
2 2018
RWC wrote:
Hello,

I'm trying to do some updates on the fly in a remote database. I'd like to
do this with code. I'm running basically the following code;

Dim db As Database
Dim tblDefs As TableDefs
Dim tblDef As TableDef
Dim strCurrentDatabase As String

strCurrentDatabase = GetDatabase("desktop", "Find Database") 'Get Database
opens dialog box to locate the database

Set db = OpenDatabase(strCurrentDatabase)

For Each tblDef In db.TableDefs

DoCmd.Rename "TMP" & tblDef.Name, acTable, tblDef.Name

Next tblDef


Check out Marshall Barton's answer in this post here:

(Note: this is going to wrap so you'll need to copy/paste to get a single line:)
http://groups.google.com/groups?hl=e...ases.ms-access

--
'-------------------------------
' John Mishefske
'-------------------------------

Nov 12 '05 #2
RWC
Thanks John, that has me headed in the right direction for sure.
"John Mishefske" <mi****@execpc.com> wrote in message
news:10*************@corp.supernews.com...
RWC wrote:
Hello,

I'm trying to do some updates on the fly in a remote database. I'd like to do this with code. I'm running basically the following code;

Dim db As Database
Dim tblDefs As TableDefs
Dim tblDef As TableDef
Dim strCurrentDatabase As String

strCurrentDatabase = GetDatabase("desktop", "Find Database") 'Get Database opens dialog box to locate the database

Set db = OpenDatabase(strCurrentDatabase)

For Each tblDef In db.TableDefs

DoCmd.Rename "TMP" & tblDef.Name, acTable, tblDef.Name

Next tblDef
Check out Marshall Barton's answer in this post here:

(Note: this is going to wrap so you'll need to copy/paste to get a single

line:) http://groups.google.com/groups?hl=e...ases.ms-access
--
'-------------------------------
' John Mishefske
'-------------------------------

Nov 12 '05 #3

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

Similar topics

1
by: Loc | last post by:
I have asp page needs to access remote database, I got error"The Microsoft Jet database engine cannot open the file 'Unknown'. It is already opened exclusively by another user, or you need permission...
2
by: Rob | last post by:
Hi, In the server explorer in Visual Studio.Net I'm able to design tables, create stored procedures, etc for the SQL 2000 database running locally on my computer. If I add a connection to a remove...
1
by: RWC | last post by:
Hi Folks, I should begin by saying I'm fairly new to SQL Server. I'm an application developer who has built front ends atop Server, but have never done much in the way of design / development....
0
by: Pentti | last post by:
Can anyone help to understand why re-parsing occurs on a remote database (using database links), even though we are using a prepared statement on the local database: Scenario: ======== We...
2
by: Jozef | last post by:
I'm using Access XP. I'm trying to create a table, modify a table, create in index, and create a relationship in a remote database in code from the program database. I know how to create and...
0
by: Bennett Haselton | last post by:
In Visual Studio .Net 2002 Server Explorer, if I add a new connection under "Data Connections", I can specify a remote server name and the username and password that I want to use, but then when...
2
by: | last post by:
Dear Groups, I am trying to develop a simple client <-> server application where (for database security reasons) the server only has access to the centralised database (and a file repository),...
4
by: JIM.H. | last post by:
Hello, My database stays in a remote site and I have access it through VPN. I would like connect my current Windows based Asp.Net application with this database. What are my options? Can I...
3
by: Pakna | last post by:
Hello, I have what may be a beginner's question regarding DB2. How does one access a remote table on a remote database via SQL? What is the command string, is there an equivalent of Oracle...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.