Save Transaction

Oct 11, 2007

Hai, Im using Sql server 2000. Im writing appliction to do Batch Update, meaning updating more than one row in single database call..
In my Requirment i may get around 2000 record to update...
so i want to us Savepoint after every 200 records are updated to the database..
Can i use save point for my requirment...can someone clarify

View 3 Replies


ADVERTISEMENT

Sql2005:Cannot Use SAVE TRANSACTION Within A Distributed Transaction

Oct 10, 2005

Error returned when trying to commit the transaction to a database that is a replication distributor. (sql2005 ctp16)

View 10 Replies View Related

Commit Transaction Gets Deleted - Unable To Save SP

Jan 24, 2006

I've re-written a stored procedure and when I post the following codeinto the existing SP in EM, is saves OK. However, when I re-edit theSP, the last line 'Commit Transaction' has been removed.I cannot save the remainder of the SP as it throws error 208 (InvalidObject name #Max) about two of the temp tables I use when I post theentire script. It shows in a message box with the header : 'MicrosoftSQL-DMO(ODBC SQLState:42S02)I haven't posted the full SP nor the structure as it's quite large(2000 lines), so hopefully I have given enough detail, but my questionsare :Why does it now have problems with (temp) #Tables ? The use of thesehas not changed. All I have done is wrap the script into varioustransactions as this helps a lot for performance and tweaked a fewparts later in the SP again for performance.Also, why does the line get removed once I save the SP ?If I run this in QA, I get the same errors, so I suspect it's myscript, but don't know where I'm going wrong.SQL2000 (Need to upgrade the service pack as recently installed on myPC, so this may help)Thanks in advanceRyanCREATE PROCEDURE [dbo].[JAG_Extract] (@ExtractYear INTEGER,@ExtractMonth INTEGER) ASBEGIN TRANSACTIONSELECT 0 AS MaxYear, 0 AS MaxMonth INTO #MaxUPDATE #Max SET MaxYear = @ExtractYearUPDATE #Max SET MaxMonth = @ExtractMonthPRINT 'Stage 1 - ' + Convert(VarChar, GetDate())CREATE TABLE #Extract ([DEALER_SOURCE_DATA_ID] INT,[DSD_YEAR] INT NULL,[DSD_MONTH] INT NULL,[DEALER_CODE] VarChar(20),[FranDealerCode] VarChar(20) NULL,[Line_No] VarChar(75),[Current] [numeric](15, 5) NULL,[YTD] [numeric](15, 5) NULL,[12Months] [numeric](15, 5) NULL,[24Months] [numeric](15, 5) NULL,[Average_YTD] [numeric](15, 5) NULL,[Average12Months] [numeric](15, 5) NULL,[Average24Months] [numeric](15, 5) NULL,[Last_YTD] [numeric](15, 5) NULL,[Current_STATUS] INT,[PD1] [numeric](15, 5) NULL,[PD2] [numeric](15, 5) NULL,[PD3] [numeric](15, 5) NULL,[PD4] [numeric](15, 5) NULL,[PD5] [numeric](15, 5) NULL,[PD6] [numeric](15, 5) NULL,[PD7] [numeric](15, 5) NULL,[PD8] [numeric](15, 5) NULL,[PD9] [numeric](15, 5) NULL,[PD10] [numeric](15, 5) NULL,[PD11] [numeric](15, 5) NULL,[PD12] [numeric](15, 5) NULL,[PD13] [numeric](15, 5) NULL,[PD14] [numeric](15, 5) NULL,[PD15] [numeric](15, 5) NULL,[PD16] [numeric](15, 5) NULL,[PD17] [numeric](15, 5) NULL,[PD18] [numeric](15, 5) NULL,[PD19] [numeric](15, 5) NULL,[PD20] [numeric](15, 5) NULL,[PD21] [numeric](15, 5) NULL,[PD22] [numeric](15, 5) NULL,[PD23] [numeric](15, 5) NULL,[PD24] [numeric](15, 5) NULL,[PD25] [numeric](15, 5) NULL,[PD26] [numeric](15, 5) NULL,[PD27] [numeric](15, 5) NULL,[PD28] [numeric](15, 5) NULL,[PD29] [numeric](15, 5) NULL,[PD30] [numeric](15, 5) NULL,[PD31] [numeric](15, 5) NULL,[PD32] [numeric](15, 5) NULL,[PD33] [numeric](15, 5) NULL,[PD34] [numeric](15, 5) NULL,[PD35] [numeric](15, 5) NULL,[PD36] [numeric](15, 5) NULL)INSERT INTO #ExtractSELECT DISTINCTSD.DEALER_SOURCE_DATA_ID,SD.DSD_YEAR,SD.DSD_MONTH,DN.DEALER_CODE,DN.FRAN_DEALER_CODE,DV.FIELD_CODE,0,0,0,0,0,0,0,0,SD.STATUS,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0FROMDEALER_NAW DN WITH (NOLOCK)INNER JOIN DEALER_SOURCE_DATA SD WITH (NOLOCK)ON DN.DEALER_CODE = SD.DEALER_CODEINNER JOIN DEALER_SOURCE_DATA_VALUES_Current DV WITH (NOLOCK)ON SD.DEALER_SOURCE_DATA_ID = DV.DEALER_SOURCE_DATA_IDAND SD.STATUS < 4096INNER JOIN DEALER_FIXED_GROUP_RELATION GR WITH (NOLOCK)ON DN.DEALER_CODE = GR.DEALER_CODEAND GR.FIXED_GROUP_ID IN(11,12,13,14,15,16,17,18,23,42,43,44,45,46,47,48,4 9,50,51,52,53,54,55,56,57,58,59,60,61,106,109,110,111,1 12,113,114,115,130,131,132,133,134,135,136,137)GOCOMMIT TRANSACTION

View 2 Replies View Related

SQL Server 2008 :: Can Second Save Transaction T2 Be Rolled Back

May 4, 2015

I am confused about save transaction in the below scenario :

begin transaction
save transaction t1
delete from #t1
save transaction t2
begin try
delete from #t2

[Code] ....

If there is error after delete #t2 , transaction t1 is rolled back. But i am not able to understand why i am getting error in the statement 'rollback transaction t2' . I am getting error as 'Cannot roll back t2. No transaction or savepoint of that name was found.'. but save point t2 is mentioned in the code.

View 3 Replies View Related

SQL Server 2005 - Save Tran Save Point Name Case Sensitive?

Feb 11, 2006

Hello:I didn't find any documentation that notes save point names are casesensitive, but I guess they are...Stored Proc to reproduce:/* START CODE SNIPPET */If Exists (Select * From sysobjects Where Type = 'P' and Name ='TestSaveTran')Drop Procedure dbo.TestSaveTranGoCreate Procedure dbo.TestSaveTranAsBeginDeclare@tranCount int--Transaction HandlingSelect @tranCount = @@TRANCOUNTIf (@tranCount=0)Begin Tran localtranElseSave Tran localtranBegin Try--Simulate Error While ProcessingRAISERROR('Something bad happened', 16, 1)/*If this proc started transaction then commit it,otherwise return and let caller handle transaction*/IF (@tranCount=0)Commit Tran localtranEnd TryBegin Catch--Rollback to save pointRollback Tran LOCALTRAN --<< NOTE case change--Log Error--Reraise ErrorEnd CatchEndGo--Execute Stored ProcExec dbo.TestSaveTran/*Should receive the following message:Cannot roll back LOCALTRAN. No transaction or savepoint of that namewas found.*//* END CODE SNIPPET */What is really strange, if there is a transaction open, then no erroris thrown. So if you execute as so:/* START CODE SNIPPET */Begin Tran--Execute Stored ProcExec dbo.TestSaveTran/* END CODE SNIPPET */There is no "Cannot roll back LOCALTRAN...." message.Questions:1-)Can someone confirm save point names are case sensitve and this isnot happening because of a server setting?2-)Is this a logic error that I am not seeing in the example codeabove?We have changed our code to store the save point name in a variable,which will hopefully mitigate this "problem".Thx.

View 4 Replies View Related

How Can I Change The Default Save-As/Save Directory

Jun 26, 2007

I am new to sql sever management studio express, but a long time query analyzer user. This is a very basic question.



I want to change the default directory in sql server management studio express so that when I go to save a query, it is already pointed to the correct one. Where do I change that?



Thanks,

Nanci





View 2 Replies View Related

Error 8525: Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

May 31, 2008

Hi All

I'm getting this when executing the code below. Going from W2K/SQL2k SP4 to XP/SQL2k SP4 over a dial-up link.

If I take away the begin tran and commit it works, but of course, if one statement fails I want a rollback. I'm executing this from a Delphi app, but I get the same from Qry Analyser.

I've tried both with and without the Set XACT . . ., and also tried with Set Implicit_Transactions off.

set XACT_ABORT ON
Begin distributed Tran
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TRANSACTIONMAIN
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.TRANSACTIONMAIN
set REPFLAG = 0 where REPFLAG = 1 and DONE = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.WBENTRY
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.WBENTRY
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.FIXED
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.FIXED
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.ALTCHARGE
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.ALTCHARGE
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TSAUDIT
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.TSAUDIT
set REPFLAG = 0 where REPFLAG = 1
COMMIT TRAN


It's got me stumped, so any ideas gratefully received.Thx

View 1 Replies View Related

SSIS, Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Feb 22, 2007

I have a design a SSIS Package for ETL Process. In my package i have to read the data from the tables and then insert into the another table of same structure.

for reading the data i have write the Dynamic TSQL based on some condition and based on that it is using 25 different function to populate the data into different 25 column. Tsql returning correct data and is working fine in Enterprise manager. But in my SSIS package it show me time out ERROR.

I have increase and decrease the time to catch the error but it is still there i have tried to set 0 for commandout Properties.

if i'm using the 0 for commandtime out then i'm getting the Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.

and

Failed to open a fastload rowset for "[dbo].[P@@#$%$%%%]". Check that the object exists in the database.

Please help me it's very urgent.

View 3 Replies View Related

Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Feb 6, 2007

I am getting this error  :Distributed transaction completed. Either enlist this session in a new
transaction or the NULL transaction. Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. Exception Details:
System.Data.OleDb.OleDbException: Distributed transaction completed. Either
enlist this session in a new transaction or the NULL transaction.have anybody idea?!

View 1 Replies View Related

Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Dec 22, 2006

i have a sequence container in my my sequence container i have a script task for drop the existing tables. This seq. container connected to another seq. container. all these are in for each loop container when i run the package it's work fine for 1st looop but it gives me error for second execution.

Message is like this:

Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.

View 8 Replies View Related

Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction. (HELP)

Jan 8, 2008

Hi,

i am getting this error "Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.".

my transations have been done using LINKED SERVER. when i manually call the store procedure from Server 1 it works but when i call it through Service broker it dosen't work and gives me this error.



Thanks in advance.


View 2 Replies View Related

SQL Server Admin 2014 :: Restore Lost Transaction From Transaction Log File

Jun 10, 2015

I have Full database backup upto previous day and transaction logfile of Today transaction. my database has crashed. I have restored previous day's Full backup. I have faced difficulty to restore today's transaction from today's transaction log. What are the steps to restore full database back and one day's transaction log file. Note: there is no differential database backup and transaction backup.

View 8 Replies View Related

I Need Away To Show The Pending Transaction From Transaction Replication In A User Friendly Format.

Jul 11, 2007



I want to list out the pending transaction for transaction replication by publication.



Help needed.

View 1 Replies View Related

TRANSACTIONS In SSIS (error: The ROLLBACK TRANSACTION Request Has No Corresponding BEGIN TRANSACTION.

Nov 14, 2006

I'm receiving the below error when trying to implement Execute SQL Task.

"The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION." This error also happens on COMMIT as well and there is a preceding Execute SQL Task with BEGIN TRANSACTION tranname WITH MARK 'tran'

I know I can change the transaction option property from "supported" to "required" however I want to mark the transaction. I was copying the way Import/Export Wizard does it however I'm unable to figure out why it works and why mine doesn't work.

Anyone know of the reason?

View 1 Replies View Related

Analysis :: Find Amount Distribution Across Different Transaction Types Under Spend Transaction

Jul 27, 2015

I created a Calculated measure in cube something like this : ([TransType].[TransTypeHierarchy].[TransTypeCategoryParent].&[SPEND],[Measures].[Transaction Amount]). To get only spend transactions. Now, I want to slice this measure with same hierarchy to find the amount distribution across different transaction types under spend transaction. But this query behaving like the measure doesn't have relation with measure.

you can think this as below query:
WITH
MEMBER SPEND AS ([TransType].[TransTypeHierarchy].[TransTypeCategoryParent].&[SPEND],[Measures].[Transaction Amount])
SELECT NON EMPTY {SPEND} ON 0
,NON EMPTY ([TransType].[TransTypeHierarchy].[TransTypeCategoryParent]) ON 1
FROM [CUBE]

View 6 Replies View Related

How Do I Make Use Of Begin Transaction And Commit Transaction In SSIS.

Jun 1, 2007

Hi



How do I make use of begin transaction and commit transaction in SSIS.

As am not able to commit changes due to certain update commands I want to explicitly write begin and commit statements. but when i make use of begin and commit in OLEDB commnad stage it throws an error as follows:

Hresult:0x80004005

descriptionyntax error or access violation.



its definately not an syntax error as i executed it in sql server. also when i use it in execute sql task out side the dataflow container it doesnt throw any error but still this task doesnt serve my purpose of saving/ commiting update chanages in the database.



Thanks,

Prashant

View 3 Replies View Related

Problem With SSIS Transaction...Transaction Scope

Jun 1, 2006



Hi,

I am having some problem with SSIS transaction. Eventhought I tried to imitate the concept that Jamie presented at http://www.sqlservercentral.com/columnists/jthomson/transactionsinsqlserver2005integrationservices.asp

. My workflow is as followed

*********************************
For Each ADO.Record in Oracle (transaction=not supported)

If (Certain_Field_Value = 'A')


Lookup Data in SQL DB with values from Oracle (transaction=not supported)

DO Sequence A (Start a Transaction , transaction=required)


INSERT/UPDATE some records in SQLDB(transaction=supported)
Finish Sequence A ( transaction should stop here)
UPDATE Oracle DB ( Execute SQLTask, transaction=not supported)
If (Certain_Field_Value = 'B')


Lookup Data in SQL DB with values from Oracle (transaction=not supported)

DO Sequence B (Start a Transaction , transaction = required)


INSERT/UPDATE some records in SQLDB (transaction=supported)
Finish Sequence A ( transaction should stop here)
UPDATE Oracle DB ( Execute SQLTask, transaction=not supported)
If (Certain_Field_Value = 'C')

------------
------------
End ForEach Loop
*************************************
My requirements are that I want separate transaction for each Sequence A, B, C, etc... If Sequence A transaction fails, the other should still be continuing with another transaction.
But I am getting an error regarding the OLEDB Error in next Task (e.g in Certain_Field_Value = 'B') "Lookup Data in SQL DB with values from Oracle ", the error message is ".......Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction. ".
What is it that I am doing wrong?
Regards
KyawAM

View 12 Replies View Related

New Transaction Cannot Enlist In The Specified Transaction Coordinator

Nov 28, 2004

I'm getting this error:

The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction.
[OLE/DB provider returned message: New transaction cannot enlist in the specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned 0x8004d00a].

http://support.microsoft.com/kb/839279 this didn't help

any suggestions?

View 3 Replies View Related

BEGIN TRANSACTION And COMMIT TRANSACTION

Oct 11, 2000

I am executing a stored procedure something like this

Create Procedure TEST
@test1
@test2
AS
BeGIN TRANSACTION ONE
SELECT...
UPDATE..
....
....

....
TRUNCATE
etc and lot of Select,update and delete statements like this
.....
COMMIT TRANSACTION ONE


The Block of code which I have b/w BEGIN TRANSACTION AND COMMIT TRANSACTION ..Will it be rolled back
if it encounters any errors in the SELECT,UPPDATE,DELETE ..statements which I have with the transaction one.
IF not How do I roll back if it encounters any erros b/w the BEGIN TRANSACTION and END TRANSACTION.

Thanks
micky

View 1 Replies View Related

New Transaction Cannot Enlist In Transaction Coordinator (was Please Help...)

Apr 18, 2005

Hi all,

In my ASP application, I've been using this code:

----------------------------------------------
dim conn, connectionstring

connectionstring= "Provider=SQLOLEDB.1; Data Source = blahblah; Initial Catalog = abc; User Id = osss; Password=xxx"

set conn = server.CreateObject("adodb.connection")
conn.open connectionstring

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

It's just basically to set up the connection to the SQL server, it works on my other pages, but on a few pages, the last line (conn.open connectionstring) triggers this error:

"Microsoft OLE DB Provider for SQL Server error '8004d00a'

New transaction cannot enlist in the specified transaction coordinator. "

I've never encountered this error before and I couldn't think of any solution... please help!!!

Thanks so much,
Annie

View 2 Replies View Related

BEGIN TRANSACTION COMMIT TRANSACTION Help

Sep 24, 2007

I had thought that if any statement failed within a BEING TRANS .. COMMIT TRANS block, then all the statements would be rolled back. But I am seeing different behavior (SQL Server 2000 8.00.2039)

For instance, run these statements to set up a test:
--DROP TABLE testTable1
--DROP TABLE testTable2
CREATE TABLE testTable1 (f1 varchar(1))
CREATE TABLE testTable2 (f1 varchar(1))
CREATE UNIQUE INDEX idx_tmptmp ON testTable1 (f1)
insert into testTable1(f1) values ('a')

So table testTable1 has a unique index on it..

Now try to run these statements:

--DELETE FROM testTable2
BEGIN TRANSACTION
insert into testTable1(f1) values ('a')
insert into testTable2(f1) values ('a')
COMMIT TRANSACTION

SELECT * FROM testTable2


..the first insert fails on the unique index.. but the second insert succeeds. Shouldn't the second insert roll back? How can I make two operations atomic?

View 8 Replies View Related

Why Transaction Gets Promoted To Distributed Transaction

Feb 1, 2007

Hi,On My local SQL server I have added a linked server to another SQLserver (remoteserver) in another Windows NT Domain.When I run this codeselect count(*) from remoteserver.mosaics.dbo.LocationThis works fine.However when I usebegin transactionselect count(*) from remoteserver.mosaics.dbo.LocationIt errors out saying thatThe operation could not be performed because the OLE DB provider'SQLOLEDB' was unable to begin a distributed transaction.New transaction cannot enlist in the specified transactioncoordinator. ]OLE DB error trace [OLE/DB Provider 'SQLOLEDB'ITransactionJoin::JoinTransaction returned 0x8004d00a].My question is even though I am just reading data from theremoteserver, why does the local transaction get promoted to adistributed transaction.Any help will be grately appreciated.TIA...Rohit

View 2 Replies View Related

New Transaction Cannot Enlist In The Specified Transaction Coordinator

May 18, 2007

Hi



I am trying transfer data from Back Office Server to Head Office using DTS. It is failing in few stores, rest of the store it is OK

Configuration

Head office :Windows 2003 SP1 and Sql Server 2000 SP3

Failing Store:Windows 2003 SP2 and SQL SERVER 2005

Successful Store :Windows 2003 SP2 qnd SQL SERVER 2000





At Store: Setting for MSDTC

Log on Account for MSDTC Service : Network Service

Network DTC Access = True

Allow Inbound = True

Allow Outbound = True

No Authentication Required = True

TurnOffRPCSecurity = 1

port Ranges for RPC = 5000- 5100



The error Message is as follows:

(Microsoft Data Transformation Services (DTS) Package (8004d00a): Connection 'Head Office SQL Server' for Task 'DTSTask_DTSDataPumpTask_1' does not support joining distributed transactions or failed when attempting to join. Unable to enlist in the transaction.
) (Microsoft OLE DB Provider for SQL Server (8004d00a): New transaction cannot enlist in the specified transaction coordinator. )



If any one can help me, that will be great!!! Thanks in advance



Shiny

View 3 Replies View Related

How To Save Img In Sql Db

May 20, 2007

how to save img in sql db ,I need some one to tell me

View 1 Replies View Related

Save Xml In Sql

Jun 19, 2007

Hi...
I want to save xml string in sql, but, i have problem, the length of the string is 19,000 - 24000 chars, and nVarChar can contain 4000 chars, and binary can contain 8000 chars...
so, how can i solve this?
thank you...

View 4 Replies View Related

Save Class

Feb 27, 2007

Hello,I created a class in my .Net code and I have an SQL 2005 table with a column of type image (I suppose I should use this type)After I define the class properties I need create a new record and save the class in the database.Can I do it the same way as I would save, for example, a string in a varchar field?Thanks,Miguel 

View 1 Replies View Related

Save Sql SUM() Into A Variable

Jul 31, 2007

 I'm just wondering if we can save sql aggregate functions into a variable. I have this query:select company, dept, sum(pers) as pers1, sum(amount) as amount1,sum(amount)/sum(pers) as wage from xxtestsumgroup by company, dept  instead of calling sum(amount) and sum(pers) again in "sum(amount)/sum(pers) as wage",I would like to save them in some kinda variable in the select clause so it will save process time.Sorry but im new to sql programming. So thx for your understanding. 

View 2 Replies View Related

Save PDF To MS SQL 2005 Using VBA

Jul 16, 2007

I am writing VBA code to save a PDF document to a SQL 2005 database table. Does anyone have any tips on how to do this? I assume the data type in the database will be varbinary(max)??

Thank you,
zzwoodsj

View 7 Replies View Related

Save As Template?

Jan 29, 2004

In Enterprise Manager when I bring up Trigger Properties there is an active button titled "Save as Template". But when I switch to an existing trigger the button is disabled. Oddly, the Help file for the dialog box doesn't even mention this button.

Anybody know what this does, how it works, or why it would be usefull? Any references to The Holy Book would be helpfull.

View 14 Replies View Related

Save To Msde

Mar 4, 2004

i have a vb6 app that writes data to a msde 7 db (in batches). when i run the process inhouse the entire process takes just under 2.30 min to save a batch of 50 records. when i run the process onsite it takes about 20 to 25 min to save the exact same batch. both enviroments are are set up the same (both have win xp and the db it is writing to is local). i took a copy of my onsite db and ran it inhouse and the results were fine (2.30 min to save the batch of 50). this process was running fine onsite up until a month and a half ago. does any one know what might of caused this issue (virus, xp updates, db curput). or does any one have any ideas on what i can try to resolve this issue.

Thank you,
Thomas

View 2 Replies View Related

Data Did Not Save Plz Help Me

Jun 5, 2008

i have made a windows applicatioon and connect to a database
but when i enter the data and presss the button then it did not save the data in database so what should i do ,here i m writing the whole code and please help me and solve this problem
private void button1_Click(object sender, EventArgs e)
{


SqlConnection CON = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Database1.mdf;Integrated Security=True;User Instance=True");

CON.Open();

//cm = new SqlCommand("INSERT INTO Student(RegNumber, Name, FatherName) Values ('" + txt_Registration_Number.Text + "','" + txt_Name.Text + "','" + txt_Father_Name.Text + "')", CON);

SqlCommand cm = new SqlCommand();

cm = new SqlCommand("INSERT INTO Student(RegNumber, Name) values(1000, 'Hasan Nizamani')", CON);
cm.ExecuteNonQuery();
CON.Close();
}

sheraz

View 1 Replies View Related

Save Picture As BIT

Apr 6, 2006

I want to save a picture uploaded by the user in BIT in Sql Database ... Help me

View 6 Replies View Related

Save DML Of Database

Jun 27, 2006

Hi,
I need to save all the DML related queries which is executed in my Database
how can i do it?
what are the possible ways to do it.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved