Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Upgrade 6->7 SQL edition
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Upgrade 6->7 SQL edition

 Post Reply Post Reply Page  <1 456
Author
phaderus View Drop Down
Newbie
Newbie
Avatar

Joined: 09 September 2003
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote phaderus Quote  Post ReplyReply Direct Link To This Post Posted: 12 September 2003 at 5:58pm

 I it looks like I am close to doing something I doubted "I" could do. I transfered a WWF 6.11 forum that used Access as it datbase, and transfered it to 7.11 using our SQL server. We will now be able to have more users at one time and will enjoy some of the new functions in 7.11 The Scripts from str8dog where priceless in this endeavour. Every thing worked fine with the exception of the "2_StoredProcedures.sql" script. The last few linew returned back back to querry analyzer after it ran the script was


Updating dbo.wwfSpModerator
Updating dbo.wwfSpLastAllForumsAuthorAndDate
Updating dbo.wwfSpCheckUserIsModerator
The database update failed

 

The code that produced this was

PRINT 'Updating dbo.wwfSpCheckUserIsModerator'
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
if exists (select * from sysobjects where id=object_id('[dbo].[wwfSpCheckUserIsModerator]') and OBJECTPROPERTY(id, 'IsProcedure')=1)
  drop procedure [dbo].[wwfSpCheckUserIsModerator]
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO

 


GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO

IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT>0 BEGIN
PRINT 'The database update succeeded'
COMMIT TRANSACTION
END
ELSE PRINT 'The database update failed'
GO
DROP TABLE #tmpErrors

I followed his instructions, with the exception of not using VS.net. Instead I ran the queries in query analyzer. So far everything works. My question is did that one message "The database update failed" is that indicative a error that will show up after I go live to the public with the updated forum?

To copy from Access I used DTS in Enterprise server Manager and imported my Access file to a new SQL databse.

If anyone want to look at the forum and or test it for bugs they can get to it at

http://www.intermatwrestle.com/forumsql/

Phaderus

Back to Top
MarvinBess View Drop Down
Newbie
Newbie
Avatar

Joined: 14 September 2003
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote MarvinBess Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2003 at 7:12am

I've been testing this script on my forum for an upgrade and it's looks like its working prety good (thnx!), But I've got one problem when 'upgrading' the author table, the following error occours:

(10959 row(s) affected)

Creating Table tblAuthor
Populating New Category and Dropping Table backup_tblAuthor
Server: Msg 8152, Level 16, State 6, Line 6
String or binary data would be truncated.

Can someone give me some clue's?

Thanks in advance, Marvin

Back to Top
thewebturtle View Drop Down
Newbie
Newbie
Avatar

Joined: 31 May 2002
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote thewebturtle Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2003 at 8:23pm

Originally posted by DaFool DaFool wrote:

i can't find the WWFSharp.sln file? Am I missing something here?

Bump

Back to Top
phaderus View Drop Down
Newbie
Newbie
Avatar

Joined: 09 September 2003
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote phaderus Quote  Post ReplyReply Direct Link To This Post Posted: 21 September 2003 at 8:20pm
You can run the *.SQL files Microsoft Query Analyzer. Just open the files in order and run them by pressing F5
Back to Top
trashbin View Drop Down
Newbie
Newbie


Joined: 20 February 2003
Location: Australia
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote trashbin Quote  Post ReplyReply Direct Link To This Post Posted: 26 September 2003 at 8:39pm

Fantastic work RONHOF......upgraded with no dramas...

Not that this has anything to do with the upgrade but....

I see the avatars are now bigger than how I had them set in V6.34 - is there a way to resize back to 35 x 35 pixels???.

no worries....I see it in skin_file.asp



Edited by trashbin
Back to Top
larsoncc View Drop Down
Newbie
Newbie


Joined: 30 September 2002
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote larsoncc Quote  Post ReplyReply Direct Link To This Post Posted: 29 October 2004 at 8:15pm

I KNOW THIS TOPIC IS OLD, BUT...

Originally posted by MarvinBess MarvinBess wrote:

I've been testing this script on my forum for an upgrade and it's looks like its working prety good (thnx!), But I've got one problem when 'upgrading' the author table, the following error occours:

(10959 row(s) affected)

Creating Table tblAuthor
Populating New Category and Dropping Table backup_tblAuthor
Server: Msg 8152, Level 16, State 6, Line 6
String or binary data would be truncated.

Can someone give me some clue's?

Thanks in advance, Marvin

 

Yes, the problem here is that the upgrade script makes the tblAuthor fields too small.

To correct this problem, COMMENT OUT the line that has the

"SELECT * INTO backup_tblAuthor FROM tblAuthor"

Then, correct the sizes of the fields, in the script.  I've modified my forum, your EXACT results may vary.

User Code needs to be 70 characters.

Home page needs to be 1000 characters.

 

Back to Top
Vapor View Drop Down
Newbie
Newbie


Joined: 02 November 2004
Location: United States
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Vapor Quote  Post ReplyReply Direct Link To This Post Posted: 02 November 2004 at 2:40pm
Here is the script that I used to import my PMs. 

Please note, I made a backup of the PM table called "backup_tblPMMessage".

I also preserved my backup Author table rather than DROPping it.

If you didn't back these tables up, I'm sorry, but you're out of luck.

I'm sure you can find a better way to automate this.  This way is an ASP script.

The major "problem" solved by this script is that the PM table uses an artificial key which is an autonumber field.  This does the job of manually looking up the old user ID #s, and relating those to the new ID #s, through the unique "Username" field, which exists in both the old and new Author table.

The jist of the first SQL call is that I've related the backup author table to the backup PM table TWICE, so that I can later find both the "To" and "From" addresses.

The rest of the work is done with the ADO find function, so that you're not calling the Author table again and again.


Server.ScriptTimeout = 3000

'This Function is just to replace ' with '' for a DB insert.
Function CleanUp(strGimme)
    return replace(strGimme,"'","''")
End Function

Response.Write "Getting Recordsets."
Response.Flush

Dim rsOldPms, rsUser

'I developed a COM+ object that returns a disconnected recordset. 
'PLEASE NOTE, it's the SQL call that's important here.  You could
'Paste it into your own ADO Recordset call just as easily.

'Also please note:  While typing this up, it looks like a mess.  I'll
'try to clean the post once it's up.

Set rsOldPms = db.GetRecordSet("SELECT backup_tblAuthor.Username AS UserIDTo, backup_tblAuthor.Author_ID, dbo.backup_tblPMMessage.PM_Tittle, dbo.backup_tblPMMessage.From_ID, " & _
"backup_tblAuthor_1.Username AS UserIDFrom, dbo.backup_tblPMMessage.PM_Message, dbo.backup _tblPMMessage.PM_Message_Date, " & _
"dbo.backup_tblPMMessage.Read_Post, dbo.backup_tblPMMessage.Email_notify, dbo.backup_tblPMMessage.Author_ID AS Expr1 " & _
"FROM dbo.backup_tblPMMessage INNER JOIN " & _
"backup_tblAuthor ON dbo.backup_tblPMMessage.Author_ID = backup_tblAuthor.Author_ID INNER JOIN " & _
"backup_tblAuthor backup_tblAuthor_1 ON dbo.backup_tblPMMessage.From_ID = backup_tblAuthor_1.Author_ID")

Response.Write "Got the PM Backup table"
Response.Flush

'Another SQL Call - again, using a COM object, but you could just
'throw this call into a recordset

Set rsUser = db.GetRecordSet("SELECT Author_ID, Username FROM dbo.tblAuthor")

Response.Write "Got the User IDs, User #s "
Response.Flush

Dim UserIDTo, UserIDFrom, tfReadPost, tfNotify

Response.Write "Writing Messages"
Response.Flush

Do Until rsOldPMs.eof
    rsUser.MoveFirst
    rsUser.Find "Username = '" & rsOldPMs("UserIDFrom") & "'"
    UserIDFrom = rsUser("Author_ID")
    rsUser.MoveFirst
    rsUser.Find "Username = '" & rsOldPMs("UserIDTo") & "'"
    UserIDTo = rsUser("Author_ID")
    If rsOldPMs("Read_Post") = True then
        tfReadPost = 1
    Else
        tfReadPost = 0
    End If
    If rsOldPMs("Email_notify") = True then
        tfNotify = 1
    Else
        tfNotify = 0
    End If

    'This is the INSERT call.  Now, you could do it by building up a
    'recordset, but this is just how I did it.

    db.execute("INSERT INTO dbo.tblPMMessage (From_ID, Author_ID, PM_Tittle, PM_Message, Read_Post, PM_Message_Date, Email_notify) "  & _
"VALUES (" & CleanUp(UserIDFrom) & "," & CleanUp(UserIDTo) & "," & CleanUp(rsOldPms("PM_Tittle")) & "," & CleanUp(rsOldPms("PM_Message")) & "," & tfReadPost & "," & CleanUp(rsOldPms("PM_Message_Date"))& "," & tfNotify & ")")

Response.Write " . "
Response.Flush
UserIDFrom = ""
UserIDTo = ""
rsOldPMs.MoveNext

Loop

Back to Top
 Post Reply Post Reply Page  <1 456

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.