Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Importing from Access to MS SQL
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Importing from Access to MS SQL

 Post Reply Post Reply Page  12>
Author
pvillaca View Drop Down
Newbie
Newbie


Joined: 03 June 2004
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote pvillaca Quote  Post ReplyReply Direct Link To This Post Topic: Importing from Access to MS SQL
    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...

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
pvillaca View Drop Down
Newbie
Newbie


Joined: 03 June 2004
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote pvillaca Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
pvillaca View Drop Down
Newbie
Newbie


Joined: 03 June 2004
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote pvillaca Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
pvillaca View Drop Down
Newbie
Newbie


Joined: 03 June 2004
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote pvillaca Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
PrivateEye View Drop Down
Groupie
Groupie
Avatar

Joined: 21 March 2003
Location: United Kingdom
Status: Offline
Points: 168
Post Options Post Options   Thanks (0) Thanks(0)   Quote PrivateEye Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2004 at 8:17am

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

The Judgement Day
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.