Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
ඔයාගෙ Assignment හෝ Thesis එක හරියට හදාගමු
ErMurazor
Updated:
Saturday at 10:52 PM
Ad icon
BlackWall V2ray servers
hu KANNA
Updated:
Wednesday at 4:58 AM
Peppa Pig Family Plush Toy Set – 5 Characters
anil1961
Updated:
Sep 19, 2026
Ad icon
Express VPN PC - 1 Year Rs. 600.00
Sanathbh
Updated:
Sep 19, 2026
Ad icon
Capcut Pro 7 Days Team Plan - Rs. 3️⃣0️⃣0️⃣
Sanathbh
Updated:
Sep 19, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
C# database උදව්වක්
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="HAneo" data-source="post: 23228220" data-attributes="member: 17432"><p><span style="color: Green"><span style="font-size: 15px"></span></span></p><p><span style="color: Green"><span style="font-size: 15px">1.කොල්ලෝ උබ මෙහෙම කරපන්. සොෆ්ට්වරේ එක හදල ඉවරනේ. දැන් ඕක හොදට ටෙස්ට් කරපන්. කරලා තියන බුග්ගෝ ටික හදල ඉවර කරහන්</span></span></p><p><span style="color: Green"><span style="font-size: 15px"></span></span></p><p><span style="color: Green"><span style="font-size: 15px">2.දැන් ස්කුඑල් සර්වර් එකෙන් බැකප් එකක් ගහපං . එක දාපන් debug ෆෝල්දෙර් එකට.</span></span></p><p><span style="color: Green"><span style="font-size: 15px"></span></span></p><p><span style="color: Green"><span style="font-size: 15px">3. අපි අලුත් එකෙට දානකොට දැන් දාල තියන ටෙස්ට් ඩේටා delete කරන්න වෙනවා. එකට InitializeProgram එකක් ලියන්න ඕනේ. </span></span></p><p><span style="color: Green"><span style="font-size: 15px"></span></span></p><p>EX: [CODE]ALTER PROCEDURE [dbo].[InitializeSystem]</p><p> @password varchar (20)</p><p>AS</p><p>BEGIN</p><p> </p><p> if(@password <>'asdqwe123#')</p><p> begin</p><p> RAISERROR ('Invalied Password', 16, 1 );</p><p> end</p><p> set nocount on;</p><p> declare @trancount int;</p><p> set @trancount = @@trancount;</p><p> begin try</p><p> if @trancount = 0</p><p> begin transaction</p><p> else</p><p> save transaction InitializeSystem;</p><p></p><p> truncate table [dbo].[DayMasters]</p><p> truncate table [dbo].[DaySessions]</p><p> truncate table [dbo].[PumpClosings]</p><p></p><p></p><p>END TRY</p><p>BEGIN CATCH</p><p> declare @error int, @message varchar(4000), @xstate int;</p><p> select @error = ERROR_NUMBER(), @message = ERROR_MESSAGE(), @xstate = XACT_STATE();</p><p> if @xstate = -1</p><p> rollback;</p><p> if @xstate = 1 and @trancount = 0</p><p> rollback</p><p> if @xstate = 1 and @trancount > 0</p><p> rollback transaction InitializeSystem;</p><p></p><p> raiserror ('InitializeSystem: %d: %s', 16, 1, @error, @message) ;</p><p></p><p>END CATCH</p><p></p><p></p><p>END</p><p></p><p>[/CODE]</p><p></p><p><span style="font-size: 15px"><span style="color: green"></span></span></p><p><span style="font-size: 15px"><span style="color: green">5. දැන් මෙමම මේකෙන් ගිහින් බලපන් C# ඇතුලේ ඉදන් රෙස්ටෝර් කරන විදිහ</span></span></p><p><span style="font-size: 15px"><span style="color: green"></span></span></p><p><span style="font-size: 15px"><span style="color: green"><a href="https://stackoverflow.com/questions/41453319/restore-sql-server-database-using-c-sharp" target="_blank">https://stackoverflow.com/questions/41453319/restore-sql-server-database-using-c-sharp</a></span></span></p><p><span style="font-size: 15px"><span style="color: green"></span></span></p><p><span style="font-size: 15px"><span style="color: green">6. ඉස්සල්ලාම ඩබ් එක රෙස්ටෝර් කරලා. පස්සේ INiitializeSP එක රන් කරපන්</span></span></p><p><span style="font-size: 15px"><span style="color: green"></span></span></p><p><span style="font-size: 15px"><span style="color: green">දැන් ස්ය්ස්ටෙම් එක රෙදඩි</span></span></p></blockquote><p></p>
[QUOTE="HAneo, post: 23228220, member: 17432"] [COLOR="Green"][SIZE="4"] 1.කොල්ලෝ උබ මෙහෙම කරපන්. සොෆ්ට්වරේ එක හදල ඉවරනේ. දැන් ඕක හොදට ටෙස්ට් කරපන්. කරලා තියන බුග්ගෝ ටික හදල ඉවර කරහන් 2.දැන් ස්කුඑල් සර්වර් එකෙන් බැකප් එකක් ගහපං . එක දාපන් debug ෆෝල්දෙර් එකට. 3. අපි අලුත් එකෙට දානකොට දැන් දාල තියන ටෙස්ට් ඩේටා delete කරන්න වෙනවා. එකට InitializeProgram එකක් ලියන්න ඕනේ. [/SIZE][/COLOR] EX: [CODE]ALTER PROCEDURE [dbo].[InitializeSystem] @password varchar (20) AS BEGIN if(@password <>'asdqwe123#') begin RAISERROR ('Invalied Password', 16, 1 ); end set nocount on; declare @trancount int; set @trancount = @@trancount; begin try if @trancount = 0 begin transaction else save transaction InitializeSystem; truncate table [dbo].[DayMasters] truncate table [dbo].[DaySessions] truncate table [dbo].[PumpClosings] END TRY BEGIN CATCH declare @error int, @message varchar(4000), @xstate int; select @error = ERROR_NUMBER(), @message = ERROR_MESSAGE(), @xstate = XACT_STATE(); if @xstate = -1 rollback; if @xstate = 1 and @trancount = 0 rollback if @xstate = 1 and @trancount > 0 rollback transaction InitializeSystem; raiserror ('InitializeSystem: %d: %s', 16, 1, @error, @message) ; END CATCH END [/CODE] [SIZE="4"][COLOR="green"] 5. දැන් මෙමම මේකෙන් ගිහින් බලපන් C# ඇතුලේ ඉදන් රෙස්ටෝර් කරන විදිහ [url]https://stackoverflow.com/questions/41453319/restore-sql-server-database-using-c-sharp[/url] 6. ඉස්සල්ලාම ඩබ් එක රෙස්ටෝර් කරලා. පස්සේ INiitializeSP එක රන් කරපන් දැන් ස්ය්ස්ටෙම් එක රෙදඩි[/COLOR][/SIZE] [/QUOTE]
Insert quotes…
Verification
Nawa warak dahaya keeyada? (Namaya wadi kireema dahaya)
Post reply
Top
Bottom