473,387 Members | 1,721 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,387 software developers and data experts.

duplicating dbase entries in seperate dbases

just a quickie before I go away and write some very ugly code that doesn't
work..

I have a dbase containing login details for 21,000 members. I also have a
forum that I am about to implement.

When the user gets to the main site, he has to login (this is done by
checking his credentials against DB1) When he is logged in, all his details
are stored in session variables. Clicking on the forum link will take him to
the forum where he has to log-in or register. Currently, the forum checks
cookies to see if there is a valid name and password and then checks these
against it's own DB (herein called DB2) or requires the user to
login/register

I plan to modify the forum so that the login is bypassed and the forum
accepts the current session name and password as the login. (This is so that
all names on the site main site, chat, forum etc are uniform, i.e Dave47 in
a chat room, is Dave47 in the forum, is Dave47 in the members area etc)
so...what I need to do (if you're still with me) is.

When a new user registers on the main site, his details are put into DB1
*and* DB2. , can I have two data sources open at once?

The reason I need two DBs is that the information in DB1 is a lot less than
is needed by the forum in DB2.

Also how can I copy selected fields from DB1 (name, password for existing
users) into DB2? like I said..there's 21,000 and to do it manually would
take forever.
hope all that made sense.

many thanks

Jul 19 '05 #1
1 1144
A better solution would be to put it all in one database, however you don't
want to do that.

So..... When you insert a record into DB1, also insert into DB2.

Dim cnDB1
Dim cnDB2
cnDB1.Open sConnectionStringToDB1
cnDB2.Open sConnectionStringToDB2

cnDB1.Execute "INSERT INTO etc."
cnDB2.Execute "INSERT INTO etc."

To update from DB1 to DB2 do.....

Dim RS

Set RS=cnDB1.Execute("SELECT [username], [password] from tableInDB1")
Do While not RS.EOF
cnDB2.Execute "INSERT INTO etc..."
RS.MoveNext
Loop

However, if either DB1 or DB2 were SQL server, you'd be better off to use
DTS to import the data.
If either DB1 or DB2 are Access you can Link tables to the other, and do an
append query.

"Alistair" <news@*remove*alistairb.co.uk> wrote in message
news:vv************@corp.supernews.com...
just a quickie before I go away and write some very ugly code that doesn't
work..

I have a dbase containing login details for 21,000 members. I also have a
forum that I am about to implement.

When the user gets to the main site, he has to login (this is done by
checking his credentials against DB1) When he is logged in, all his details are stored in session variables. Clicking on the forum link will take him to the forum where he has to log-in or register. Currently, the forum checks
cookies to see if there is a valid name and password and then checks these
against it's own DB (herein called DB2) or requires the user to
login/register

I plan to modify the forum so that the login is bypassed and the forum
accepts the current session name and password as the login. (This is so that all names on the site main site, chat, forum etc are uniform, i.e Dave47 in a chat room, is Dave47 in the forum, is Dave47 in the members area etc)
so...what I need to do (if you're still with me) is.

When a new user registers on the main site, his details are put into DB1
*and* DB2. , can I have two data sources open at once?

The reason I need two DBs is that the information in DB1 is a lot less than is needed by the forum in DB2.

Also how can I copy selected fields from DB1 (name, password for existing
users) into DB2? like I said..there's 21,000 and to do it manually would
take forever.
hope all that made sense.

many thanks


Jul 19 '05 #2

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

Similar topics

4
by: Alistair | last post by:
IIS, Access 2000 I have a page that tabulates data from a DB, this data is items for sale, private ads. is there a way that at the same time it can automatically delete entries that are...
0
by: Bethusdala | last post by:
Via Cpanel, and then Database Manager, I accidently clicked on the Trash bin over the dbase and voila! It's sort of history. I FTP'ed to the folder where the Dbase was, well, everything is there....
2
by: Ivan | last post by:
Hi, SQL Server 2000 SP3 Windos 2000 Server SP4 I have a DTS package that imports data from a dBase IV databse with files located in two folders (dBF1 and dBF2). I use a transform data task...
3
by: andreas.maurer1971 | last post by:
Hi all, since a few years I use the following statement to find duplicate entries in a table: SELECT t1.id, t2.id,... FROM table AS t1 INNER JOIN table AS t2 ON t1.field = t2.field WHERE...
1
by: Derek Griffiths | last post by:
Most of the complicated programs I write are boring applications that manipulate databases associated with the medical billing program where I work. The program uses foxpro dbases (version 3) for...
2
by: Todd Plambeck | last post by:
I have an ASP.net order entry system that will occasionally insert duplcate orders into the database. We are using SQL Server for the session state. This also only seems to happen when the server...
11
by: EdB | last post by:
I'm still having trouble grasping what's going on here and how to resolve it. In VB6 I have a form that has several combo boxes with lots of items in each; it takes a long time to load the form...
5
by: MontainDoctor | last post by:
Hi Folks I have a database in dbase. The dbf tables have numerous indexes because of which the linking is not possible. What to do? Rakesh
2
by: bcbrock | last post by:
I am trying to figure out how to query some data out of a dbase IV (.dbf) file sitting on a remote server from my MySQL/PHP/Web Server. Both servers are Windows Server 2003 SP2. My...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
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,...
0
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...
0
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...

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.