Print Page | Close Window

Importing from Access to MS SQL

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=10831
Printed Date: 08 April 2026 at 2:46pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Importing from Access to MS SQL
Posted By: pvillaca
Subject: Importing from Access to MS SQL
Date Posted: 11 June 2004 at 2:09pm

Hi!

I finally managed to install the SQL version of the forum and I even was succeded in "importing" the skin and button files from the old forum to the new one (which is a big deal for a moron like me).

HOWEVER (sigh), I'd like to know if there's a way of "importing" the forum structure (topics, etc), the messagens and the registered users (about 1500) from the Access forum to the SQL one. I'm dreading the moment I'd have to tell my users they'll have to register again...




Replies:
Posted By: michael
Date Posted: 11 June 2004 at 11:28pm
If you do a search on the forum you will find that this has been discussed a bunch of times. You should find the required info there.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: pvillaca
Date Posted: 12 June 2004 at 12:14am

Yes, I know. I'm sorry. I checked it and found it. Thanks.

However, I'm having a new problem. I did the procedure:

All Tasks - Import Data
Data Source: Microsoft Access.
Then I chose the access database file from the old forum.

Use SQL Server Authentication
Copy Table(s) and view(s) from the source database

Selected All Tables
Ran the program

Result: Successfully copied 18 table(s) from MS Access to MS SQL Server

YEAH!!!! But, for my huge disapointment, when I checked my forum:

0 Topics, 0 Threads and 2 Members. ( had 1533 members)

The strange thing is: it shows me the users that are logged in my OLD forum....

I searched the forum and didn't find a solution. Can anyone help me?



Posted By: pvillaca
Date Posted: 12 June 2004 at 6:39pm

Ok, I solved some problems than ran into new ones. How did I solve the initial problems (so future users can know an option):

The problem was: the data didn't show on my forum. When I checked the Tables directory on the database, I found out that everything was duplicated: the tblAuthor, for instance, appeared two times: one created by owner DBO and other by me.

Then I tried to import the data by doing Windows Authentication. Well, 6 tables weren't created correctly. Error message. Strange thing: the ones that WERE created through Windows Aut. (and that had DBO as owner) started to show on the forum - it worked!

Problem is: 6 important tables (including the one that cointains users and the Threads one) can't be imported through Windows Aut., only by SQL Authentication (my user ID).

So, what did I do?

From query analyzer, I tried to ran:

EXEC sp_changeobjectowner @objname='yourid.tablename', @newowner=dbo

for each of the duplicated tables.
However, when I initially tried to change the ownership, it didn't let me, saying the dbo already had a file with that name. So I tried to delete the original dbo file, but the system didn't let me, saying the file had "references", or something like that. So I renamed the file and THEN changed the ownership to dbo. It worked like a charm: my users and topics showed up on the forum! But I could not delete the original dbo file, even after all that.

(Is there a problem about doing it that way? And how can I delete the original (now renamed) dbo file?)

Well, it didn't stop there. When I thought everything was fine, I tried to post messages on the forum and got the "Provider permission or locktype" thing on the post_message.asp, line 604. Damn. I searched this forum for a solution but couldn't find one. Every topic that had that question asked was ignored by other users. SO.... Is it unsolvable?



Posted By: pvillaca
Date Posted: 12 June 2004 at 7:41pm

Regarding the new problem. I get this message:

 ADODB.Recordset error '800a0cb3'

Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.

/forum/post_message.asp, line 604

Line 603 and 604 read:

Insert the new topic details in the recordset
  .AddNew



Posted By: Semikolon
Date Posted: 13 June 2004 at 6:59am
  1. Run a Compact and Reapir on your Access database. (maybe not very important, but do it anyway)
  2. delete your SQL Server database.
  3. Create a new one
  4. Use the Upsize wizard in Access to copy everything to the SQL Server Db. Use your SQL Server login details
  5. Open mssql_server_setup.asp in a text editor and delete line 200-1693.
  6. Run the script


Posted By: PrivateEye
Date Posted: 13 June 2004 at 8:17am

Run the script again after setting the CursorLocation Property to ClientSide.



-------------
The Judgement Day


Posted By: dpyers
Date Posted: 13 June 2004 at 1:23pm

I use a service that restricts dbo ownership. As a result, I had to go through the db and assign the same permissions dbo had to my mssgl Login ID for the db.

Wasn't just tables, but also included views, stored procedures, etc. Prior to doing that, I was getting messages similar to the last one you posted.



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: pvillaca
Date Posted: 13 June 2004 at 11:14pm

Thank you all for the input. I tried and I tried, but no dice.

So I just scrapped the old database and started the forum from scratch. Some of my users didn't like it, but, 4 hours after the fact, 114 of the 1533 are registered again.

So I guess they'll have to live with that.

(Oh, and that means that the "Recordset" problem was caused by importing the data to SQL...)




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net