|
hiteshsqlserver
Starting Member
1 Post |
Posted - 2004-09-11 : 10:16:22
|
| Hi there!,I am getting the time out error on my page "cwp_editor.asp" as belowMicrosoft OLE DB Provider for ODBC Drivers error '80040e31' [Microsoft][ODBC SQL Server Driver]Timeout expired Basically on above page I have some text fields and one HTML editor (just like textarea) box...When I am entering a lot of content into that HTML editor box then I am getting above error. Some times I left blank that box then also I am getting the same error. I am wonder how?My DB design for the table is...cwebpage_id int 4 ....auto number field + primary keygroup_id int 4 ...foreign keycwp_name nvarchar 250 cwp_active tinyint 1 cwp_highlightlink tinyint cwp_showlink tinyint 1 modify_date datetime 8 cwp_showcontent tinyint 1 cwp_contents text 16......here I am storing the contentcwp_priority bigint 8==Somebody has said to me that you should create another table and put two fields as below...& remove conetnt field from the master tablecwebpage_id int 4 ....foreign keycwp_contents text 16...content fieldbut in this way, I will have to make change at may palces and it's a really a lot of work for me.Can I do anything here so with less effort I can resolve the issue?When I select/update the data, I use stored procedure here.SP used at the time of select query~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~CREATE PROCEDURE get_custom_webpages@group_id int,@cwebpage_id int,@multipledata int /* 1= Single Data, 2 = Group of Data*/ASIF @multipledata = 1BEGIN SELECT cwebpage_id, cwp_name, cwp_active, cwp_highlightlink, cwp_showlink, CONVERT(VARCHAR(50),modify_date,101), cwp_showcontent, cwp_contents FROM custom_webpages WHERE group_id = @group_id AND (cwebpage_id = @cwebpage_id OR @cwebpage_id = 0) ORDER BY cwp_nameENDIF @multipledata = 2BEGIN SELECT cwebpage_id, cwp_name, cwp_active, cwp_highlightlink, cwp_showlink, CONVERT(VARCHAR(50),modify_date,101), cwp_showcontent, cwp_contents FROM custom_webpages WHERE group_id = @group_id ORDER BY cwp_priority DESCENDGOSP used at the time of upate query~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~CREATE PROCEDURE save_custom_webpages@operation_code int, /*1 = insert, 2 = update*/@cwebpage_id int,@group_id int,@cwp_name nvarchar(250),@cwp_active tinyint,@cwp_highlightlink tinyint,@cwp_showlink tinyint,@cwp_showcontent tinyint,@cwp_contents text,@cwp_priority bigintASDECLARE@success_code intSELECT @success_code = 100BEGIN TRANIF @operation_code = 1/*insert*/BEGIN INSERT INTO custom_webpages ( group_id, cwp_name, cwp_active, cwp_highlightlink, cwp_showlink, cwp_showcontent, cwp_contents, cwp_priority ) VALUES( @group_id, @cwp_name, @cwp_active, @cwp_highlightlink, @cwp_showlink, @cwp_showcontent, @cwp_contents, @cwp_priority ) IF @@error != 0 BEGIN SELECT @success_code = 200 GOTO ROLLBACK_AREA END SELECT @cwebpage_id = @@identityEND /*insert*/ELSE IF @operation_code = 2 /*update*/BEGIN UPDATE custom_webpages SET cwp_name = @cwp_name, cwp_active = @cwp_active, cwp_highlightlink = @cwp_highlightlink, cwp_showlink = @cwp_showlink, cwp_showcontent = @cwp_showcontent, cwp_contents = @cwp_contents, modify_date = getdate() WHERE cwebpage_id = @cwebpage_id IF @@error != 0 BEGIN SELECT @success_code = 200 GOTO ROLLBACK_AREA ENDEND /*update*/ELSE IF @operation_code = 3 /*Delete*/BEGIN DELETE FROM custom_webpages_subpages WHERE cwebpage_id = @cwebpage_id DELETE FROM custom_webpages WHERE cwebpage_id = @cwebpage_id IF @@error != 0 BEGIN SELECT @success_code = 200 GOTO ROLLBACK_AREA ENDEND /*Delete*/COMMIT TRANSELECT @success_code, @cwebpage_idreturnROLLBACK_AREA:ROLLBACK TRANSELECT @success_code, @cwebpage_idreturnGO===============Can anybody help to me so I can correct my work with less efforts?I will be really thankful to you.Thanks.Hitesh Patel.Hitesh Patel |
|