Site Server 3.0

[ Contents | Search | Post | Reply | Next | Previous | Up ]

Re: Importing Databases

From: RI
Date: 6/27/98
Time: 11:26:27 PM

Comments

Sure there is. Let's say, for example, you have a table in your database that contains user information (assuming 1st normal form for simplicity). That has the following structure:

ColName DataType ------------------------------------------------ ID Binary szFirstName VarChar szLastName VarChar szEmail VarChar

Now all you have to do is setup a script that loops through each row in the table and assigns copies the values from each column to their associated values for new Member objects in Site Server. Consider doing the following:

1. Create a connection to your table with ADO 2. Create a connection to your Membership Directory via ADSI 3. Start looping through each row in your table 4. Create a new Member object based on the ID and first name (szFirstName) assigned in the table. 5. Copy each remaining column of the table to the associated property in the new Member object. 6. Now iterate through the next row and repeat steps 3 through 6.

Make sense?

 

Last changed: September 22, 1998