How create a table object in linked databse

smd7m

Registered User.
Local time
Today, 01:35
Joined
Feb 1, 2007
Messages
79
hi
I have a project in access 2003
Cantain :
1- Main Database (Cantain : Forms,Querys, Report and ...)
2- Database Splitter (cantain : Tables)

Now;

How create a Table in Linked databse (Database Splitter)?
 
Re: How create a table object in lenked databse

It sounds like you are saying the database is already split and you just need to link the tables. If this is so, then open the front end to the Database Object Window and go to File > Get External Data > Link Tables.

OR

Did you want to split the database?
 
Re: How create a table object in lenked databse

Create Table in Linked Database

I have a separate database for my data and my application that i have linked
when the program starts up.
Is there a way to do a create table statement in the application database
that will put the table in the linked database as opposed to the application
database?
 
Re: How create a table object in lenked databse

Sorry, I am confused...

Are you saying you don't want to *see* your tables in your front end? If that is what you want then the only way is to *HIDE* them BUT any novice User can figure out how to unhide. Other then that I do not know of a way.
 
Re: How create a table object in lenked databse

hi

Are you saying you don't want to *see* your tables in your front end?

I can see the tables.

Is there a way to do a create table statement in the application database
that will put the table in the linked database as opposed to the application
database?

With coding in VBA.
progress.gif
 
Re: How create a table object in lenked databse

I am having a hard time understanding your request. Are saying you don't want the linked table in the front end you want the actual table AND you want to do that via code (VBA)?
 
Re: How create a table object in lenked databse

how to do that via code (VBA)?
 
Re: How create a table object in lenked databse

And just a note - IF your database has been properly designed then it is very RARE to have to add a table to the database. If you are doing this more than that, then I would want to know why. Why do you need to create a table via code?
 
Re: How create a table object in lenked databse

TransferDatabase NO; Create a table by code but in linked databse.

For Examle for add filed in linked databse by code.

Dim db As Database
Dim tb As TableDef
Dim pat As String

pat = fGetLinkPath("table1")
Set db = OpenDatabase(pat)
Set tb = db.TableDefs("Table1")
With tb
.Fields.Append .CreateField("fild2", dbText, 50)
.Fields.Append .CreateField("fild1", dbBoolean)
End With

Set db = Nothing
Set tb = Nothing

Now , I need Code for Create Table?
 
Re: How create a table object in lenked databse

Please Help me
 
Re: How create a table object in lenked databse

Please Help me

I was attempting to, but you chose to ignore my questions. WHY do you need to do this? What is the purpose of doing this? As I said, adding a table to a backend should be a RARE thing and so I question (so as to hopefully give you the most robust solution that you need) what the purpose is.

As I posted in the other thread where you just blindly threw code out to someone who is also attempting to do something where there are questions as to how wise it is to do what they were asking, we do not just answer blindly to some questions. This forum has a history of trying to give the BEST answer using BEST PRACTICES and that doesn't always entail giving the particular answer that was originally sought.

If that bothers you then there may be other places which will just blindly answer the questions without ensuring that it is the best response which will help with the maintenance and good design of the database.
 
Re: How create a table object in lenked databse

Sorry mr boblarson

WHY do you need to do this? What is the purpose of doing this?

The main program will have delivered to customers.


The database tables must be updated.


Ie:
Added Field
Addes Tables
And ...

Customers can receive the new program, but the new changes will also apply.



******************************

My program consists of two parts.
1 - database-related forms
2 - The database tables
The database tables are linked to the main database.
Now I want to create a table using code.
This code should be linked to database tables in order to give the new table is created.
I like the sample code listed above.
In this example;
The new field is added to the link Tables.
:(
 
Re: How create a table object in lenked databse

Sorry mr boblarson



The main program will have delivered to customers.


The database tables must be updated.


Ie:
Added Field
Addes Tables
And ...

Customers can receive the new program, but the new changes will also apply.



******************************

My program consists of two parts.
1 - database-related forms
2 - The database tables
The database tables are linked to the main database.
Now I want to create a table using code.
This code should be linked to database tables in order to give the new table is created.
I like the sample code listed above.
In this example;
The new field is added to the link Tables.
:(

Check out my Backend Auto Update Tool on my website. If it doesn't do exactly what you need at least most of the code to do it should be there and you can use whatever you want. One thing it doesn't do though is deal with relationships. I had built this to remotely update a client's backend and for that I didn't need to deal with the relationships. Dave (gemma-the-husky) is in the process of trying to build a tool that does deal with the relationships and all. That part isn't an easy thing to deal with really.
 
Re: How create a table object in lenked databse

Bob,
I tried to use your tool. it seems to work nice. Only thing didn't work for me was the ADD TABLE.
why don't you use the CREATE TABLE statement ?

will it all work for a password protected db ?
 

Users who are viewing this thread

Back
Top Bottom