Problems With More Than 1 Reader
Mar 13, 2006
Dim conn As SqlConnection = Nothing
Dim cmd As SqlCommand
Dim cmd2 As SqlCommand
try
conn = New SqlConnection(ConfigurationManager.ConnectionStrings("myConnection").ConnectionString)
conn.Open()
cmd = New SqlCommand
cmd.Connection = conn
cmd2 = New SqlCommand
cmd2.Connection = conn
dim reader As SqlDataReader = cmd.ExecuteReader
Right this works and I can access reader fine
but as soon as I do the following I get an error
reader2 = cmd2.ExecuteReader (reader2 is already declared just not put on here)
the error is "There is already an open DataReader associated with this Command which must be closed first."
which is odd because there sqlcommand used for reader2 is different.
Can I not use more than one reader at anyone time? I used to have loads of recordsets open in asp 3 no prob.
Cheers
View 3 Replies
ADVERTISEMENT
Jun 26, 2007
As you see in the images the connection is closing. During the read it counts 5 columns which is correct. When I step through the code it closes the connection when it hits dt.Load(reader) and nothing is loaded into the datatable.
------------------------------------------------------------AS I STEP THROUGH -----------------------------------------------------------------------------------------------------------------------
Please help,
Thanks,
Tom
View 1 Replies
View Related
Aug 22, 2007
We dont want to use triggers or replication to capture changes in a set of tables; we have the same problem in Oracle and we use LogMiner to do so. We have been looking for similar tools in SQL Server but the ones we have found so far dont seem to fulfill our requirements (Redgate and Lumigent).
Does anyone know any other third party application that can read a SQL Server log and extract changes filtering by table name?
Thanks.
View 1 Replies
View Related
Sep 24, 2007
is it possible to use a data reader to read from 2 tables with 1 store procedure(sp)?
-------------------------------------------------
ex:
create sp1
as
select * from tbl1
select * from tbl2
-------------------------------------------------
how can i use a data reader to read the items from tbl2?
View 5 Replies
View Related
Feb 22, 2008
Hi Guys,I have a quick question about DataReader, I have a function called "ExportTotal" i am calling this function from another function. what it does is it will put the Total for each Network in the Line 34. Right now what it is doing is It is putting the First Networktotal,2ndNetwork total,3rdNetwork total....... in the line 34. what i want is if the control comes to first network then it has to put only 1st network total and for the 2nd network only 2nd network total and so on. Please see my function below. Can you guys tell me what i am doing wrong?ThxPrivate Function exporttotal() As String Dim sql As String Dim dbFunctions As New DatabaseUtilities Dim tempinvoicetotal As String 'Dim rateactuals As String Dim filetext As String Dim tempclientname As String Dim strconn As String Dim prev_network As String = "" Dim current_network As String = "" strconn = CONNECTIONSTRING sql = "SELECT CAST(SUM(tblSpot.rateActual) AS int(4)) AS Rateactuals, SUM(tblSpot.rateActual * 0.85) AS netrate, SUM(tblSpot.rateActual * 0.15) AS commrate,TBLCLIENT.CLIENTNAME " & _"FROM tblSpot INNER JOIN tblContract ON tblSpot.fkContract = tblContract.pkid INNER JOIN " & _ " tblClient ON tblContract.fkClient = tblClient.pkid WHERE tblSpot.fkContractType = 'UNWIRED' AND " & _ "fkInvoiceNumber = '" & Me.txtinvoicenumber.Text & "' GROUP BY TBLCLIENT.CLIENTNAME" Dim myConn As New SqlConnection(CONNECTIONSTRING) Dim myCommand As New SqlCommand(sql, myConn) myConn.Open() Dim dbreader As SqlDataReader = myCommand.ExecuteReader() While dbreader.Read() Try Dim Rateactuals As String If dbreader("Rateactuals") Is DBNull.Value Then Rateactuals = "" Else Rateactuals = dbreader("Rateactuals") tempinvoicetotal = Rateactuals End If Dim clientname As String If dbreader("clientname") Is DBNull.Value Then clientname = "" Else clientname = dbreader("clientname") tempclientname = clientname End If If prev_network = "" Then filetext = filetext & vbCr & "34;;" & tempinvoicetotal & "00" & ";"Session("EDIExport4") = filetext prev_network = tempclientname Else current_network = tempclientname If prev_network <> current_network Then filetext = filetext & vbCr & "34;;" & tempinvoicetotal & "00" & ";"Session("EDIExport4") = filetext prev_network = tempclientname Else End If End If Catch SqlEx As SqlClient.SqlException Session("Error") = SqlEx.Message.ToString Response.Redirect("Error.aspx?Form=" & Request.Path) Catch Ex As System.Exception Session("Error") = Ex.Message.ToString Response.Redirect("Error.aspx?Form=" & Request.Path) End Try dbFunctions = Nothing End While myConn.Close() End Function
View 7 Replies
View Related
Nov 29, 2005
Hello, I'm trying to run the following snippet as Console app, and I get an error: "a reader is already open for this connection, and should be closed first" I tried to manually say: SqlDataReader.Close() in the begining of the code, but still get the error, Any suggecstions how to manually close the reader? thank you ---------- here's the code -----------using System; using System.Data; using System.Data.SqlClient; using System.Data.SqlTypes; namespace ADO.NET { /// <summary> /// Summary description for Class1. /// </summary> class Class1 { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main(string[] args) { SqlConnection cn = new SqlConnection ("SERVER=MyServer; INTEGRATED SECURITY=TRUE;" + "DATABASE=AdventureWorks"); SqlCommand cmd1 = new SqlCommand ("Select * from HumanResources.Department", cn); cmd1.CommandType = CommandType.Text; try { cn.Open(); SqlDataReader rdr = cmd1.ExecuteReader(); while (rdr.Read()) { if (rdr["Name"].ToString() == "Production") { SqlCommand cmd2 = new SqlCommand("SELECT * FROM " + "HumanResources.Employee WHERE DepartmentID = 7", cn); cmd2.CommandType = CommandType.Text; SqlDataReader rdr2 = cmd2.ExecuteReader(); while (rdr2.Read()) { } rdr2.Close(); } } rdr.Close(); } catch (Exception ex) { Console.WriteLine (ex.Message); } finally { cn.Close(); } } } }
View 2 Replies
View Related
Apr 28, 2008
I am trying to do incremental extract using Datasource reader.
I need to send a variable in where condition to extract the data base on the max date from other table.
To implement this i have created two variables
1)to get the max date from the table.
2)to store the sql query and send the mad date from other variable to extract the data.
i have give this sql variable in data flow expression.but its not working.
can any one tell me where i am going wrong.
View 2 Replies
View Related
Apr 26, 2007
MY Current database in SIMPLE recoverey model
I have set up the transactional replication. MY log reader process wakes up and runs every 5 min. Does my transactions will get deleted or they still in log file as active even it is in simple recover model.
Logreader how it reads the Transaction log files .? I observed today we are running some big reports. those reports uses INSERT INTO FROM <TABLE > this process showing in DBCC OPENTRAN
MY log reader keep on reading the log file.. it did not come out from that five min duration...
Can someone from the MS share the what /how exactly log reader works ( inside details)
I would like to add more details
The Log Reader Agent is scanning the transaction log for commands to be replicated. Approximately 30500000 log records have been scanned in pass # 3, 1696 of which were marked for replication, elapsed time -623164036 (ms).
The Log Reader Agent is scanning the transaction log for commands to be replicated. Approximately 31000000 log records have been scanned in pass # 3, 1713 of which were marked for replication, elapsed time -177869239 (ms).
everytiome counter startwith 500000 records and keegoing for some time and it is delivering the transactions never stopping the job
Why elpse time is in negative?
How to understan
Do you guys think it is really sc
Thanks
Srini
View 25 Replies
View Related
Jul 18, 2006
Hi,
I am trying to creating an application using C# where I read data from a SQL server. In the database, I have two tables. One that has the Order info and other table has the item info for each of the rows in the Order table. In my application I am run a query and open up a datareader to read in the Order info. While OrderInfoDataReader is still open, I run another query to get the ItemInfo and open another data reader. Well, ADO.Net does not allow two datareader be open at the same time.
My question, what would be a way around to solve the issue? I would greatly appreciate your help.
Thanks,
Emon.
View 1 Replies
View Related
Aug 18, 2006
hello,
I have tried myReader.GetSqlString, GetSqlValue, GetSqlInt16, etc...etc...
But I keep getting an error (System.InvalidCastException was caught Message="Conversion from type 'SqlInt32' to type 'String' is not valid." Source="Microsoft.VisualBasic" StackTrace: at Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) at ImportDelimitedFile.SumCurrentAmount() in C:Documents and Settingsemg3703My DocumentsVisual Studio 2005EscuelasComunidadImportDelimitedFile.aspx.vb:line 556)
Here is my code:
Public Function SumCurrentAmount() As String Dim sqlconn As New SqlConnection(ConfigurationManager.ConnectionStrings("GDBRemitanceConnectionString1").ConnectionString) Dim sqlcmd As New SqlCommand("SELECT SUM(CONVERT (Int, Field_6)) AS TotalAmount, Record_Type FROM tblTempWorkingStorage_NACHA GROUP BY Record_Type HAVING (Record_Type = '6')", sqlconn) Try sqlcmd.Connection.Open() Dim myReader As SqlDataReader myReader = sqlcmd.ExecuteReader(CommandBehavior.CloseConnection) If myReader.Read() Then SumCurrentAmount = CType(myReader.GetSqlValue(0), String) Return SumCurrentAmount Else End If myReader.Close() Catch End Try sqlcmd.Connection.Close() End Function
I need to know which "GetSql...(type) should I used to extract field numbre one from myReader.
Thanks a lot,
View 1 Replies
View Related
Jun 11, 2007
Hi All,
I got an error while running this code.There is already an open DataReader associated with this Command which must be closed first
How can I resolve the error?
protected void Page_Load(object sender, EventArgs e) { string sql; SqlConnection Connection = new SqlConnection("ConnectionString"); sql = "SELECT PO_SE_Line_ID FROM PO_STOCK_QUERY_LINE_DETAILS WHERE TRANS_NUM ='TR-A-00-01-93'";
SqlCommand command = new SqlCommand(sql, Connection); SqlDataReader Dr; Connection.Open(); Dr = command.ExecuteReader(); while (Dr.Read()) {
sql = "SELECT SUPPLIER_ITEM_CODE,SUPPLIER_MAN_DESC,SUPPLIER_PAT_DESC,SUPPLIER_ITEM_DESC,SUPPLIER_ADDIT_DESC,SUPPLIER_SUGG_RETAIL FROM PO_STOCK_QUERY_LINE_DETAILS where TRANS_NUM ='TR-A-00-01-93' and PO_SE_Line_ID=" + Dr["PO_SE_Line_ID"].ToString();
SqlCommand command1 = new SqlCommand(sql, Connection);
SqlDataReader Dr1;
Dr1 = command1.ExecuteReader(); while(Dr1.Read()) {
Response.Write(Dr["SUPPLIER_ITEM_CODE"].ToString()); Response.Write("<br>"); Response.Write(Dr["SUPPLIER_MAN_DESC"].ToString()); Response.Write("<br>"); Response.Write(Dr["SUPPLIER_PAT_DESC"].ToString()); Response.Write("<br>"); Response.Write(Dr["SUPPLIER_ITEM_DESC"].ToString()); Response.Write("<br>"); Response.Write(Dr["SUPPLIER_ADDIT_DESC"].ToString());
}Dr1.Close();
}Dr.Close();
I tried to close the first data reader before opening the second data reader.still the error persists.
View 5 Replies
View Related
Jun 26, 2007
Hi, i dont know whats gone wrong! but all of a sudden it seems to be throwing an error, i have looked at my previous code and it matches exactly when it was working, here is the code below int i = 0;for (i = 1; i <= 3; i++)
{
//This gets the stock ID from the textbox.string stock_ID = ((TextBox)Panel1.FindControl("txtID" + i.ToString())).Text;
//This is the sql statement.string sql = "SELECT [n_or_sh], [title], [cost_price], [selling_price] FROM tbl_stock WHERE stock_ID = " + stock_ID;
//This creates a sql command which executes the sql statement.SqlCommand sqlCmd = new SqlCommand(sql, myConn);
myConn.Open();
//This is a reader for the results to go in.SqlDataReader dr = sqlCmd.ExecuteReader();
//This reads the first result from the sqlReader
dr.Read();
//This sets the title label text to the value of the description column.TextBox currentBox1 = (TextBox)Panel1.FindControl("txtDesc" + i);
string strtxtDesc = currentBox1.Text;strtxtDesc = dr["title"].ToString();
};
myConn.Close();
i = 0;
the error its throwing is this
CS1519: Invalid token '(' in class, struct, or interface member declaration for the line myConn.Open()
does anybody have any idea how to solve this?
Jez
View 4 Replies
View Related
Aug 17, 2007
In my current application, I have an administration form that fills in labels and checked states via data entered into the database using a similar user input field. What the admin page does is it first lists all the record names in a listview, then on select, it fills in the form based on what the records contain. This means labels text change, and check states change based on the string "True" or "False". This was done using the SQL Reader command.
Within the same form, the read checkboxes are editable via the admin. When the admin edits the controls, he will click the update button at the bottom and the database will UPDATE .. WHERE UserName = (Scalar for ListBox1.SelectedValue)
I've used the exact same UPDATE command in my form for the user, except the only difference was @ the WHERE clause-- I had it updating based on a GUID. I know my SQL statement is correct, but it just won't update the data.
Is it possible that the READER, which starts (and closes) on pageload cannot coexist within the same form as the UPDATE code?
My code is incredibly long, so for the purposes of a short post I'm not including any bit of it-- but if you would like to see it, just let me know.
View 5 Replies
View Related
Dec 26, 2007
I have an SqlDataReader which loops through records returned from an SP, within that loop I would like to initiate another SP, but for some darn reason the following code won't work: // create SqlConnection object
string ConnectionString = ConfigurationManager.ConnectionStrings["aiv3cs"].ConnectionString;
SqlConnection myConnection = new SqlConnection(ConnectionString);
try
{
// Create a new XmlTextWriter instance
XmlTextWriter writer = new
XmlTextWriter(Server.MapPath("products.sitemap"), Encoding.UTF8);
writer.WriteStartDocument();
writer.WriteStartElement("siteMap");
writer.WriteAttributeString("xmlns", "http://schemas.microsoft.com/AspNet/siteMap-File-1.0");
// create the command
SqlCommand myCommand = new SqlCommand();
myCommand.Connection = myConnection;
// set up the command
myCommand.CommandText = "spGetMenuStructure";
myCommand.CommandType = CommandType.StoredProcedure;
// open the connection
myConnection.Open();
// run query
SqlDataReader myReader = myCommand.ExecuteReader();
bool HasSubElements = false;
SqlCommand myCommand2 = new SqlCommand();
SqlParameter myParameter1 = new SqlParameter();
SqlDataReader myReader2 = new SqlDataReader();
// parse the results
while (myReader.Read())
{
// create the command
myCommand2.Connection = myConnection;
// set up the command
myCommand2.CommandText = "spGetMenuSubElements";
myCommand2.CommandType = CommandType.StoredProcedure;
myParameter1.ParameterName = "@ContentID";
myParameter1.SqlDbType = SqlDbType.Int;
myParameter1.Value = Convert.ToString(myReader["ID"]);
myCommand2.Parameters.Add(myParameter1);
// run query
myReader2 = myCommand2.ExecuteReader();
while (myReader2.Read())
{
HasSubElements = true;
}
myReader2.Close();
if (Convert.ToString(myReader["HasPage"]) == "1")
{
writer.WriteStartElement("siteMapNode");
writer.WriteAttributeString("title", Convert.ToString(myReader["PageTitle"]));
writer.WriteAttributeString("description", Convert.ToString(myReader["PageTitle"]));
string PageURL = Convert.ToString(myReader["PageName"]) + "?ContentID=" + Convert.ToString(myReader["ID"]);
writer.WriteAttributeString("url", PageURL);
if (HasSubElements)
{
writer.WriteEndElement();
}
}
else
{
writer.WriteStartElement("siteMapNode");
writer.WriteAttributeString("title", Convert.ToString(myReader["PageTitle"]));
writer.WriteAttributeString("description", Convert.ToString(myReader["PageTitle"]));
}
HasSubElements = false;
}
myReader.Close();
// end the xml document and close
writer.WriteEndElement();
writer.WriteEndDocument();
writer.Close();
}
finally
{
myConnection.Close();
}I've gotten the following two errors:There is already an open DataReader associated with this Command which must be closed first.And a build error:Error29The type 'System.Data.SqlClient.SqlDataReader' has no constructors defined Any suggestions would be most appreciated.
View 4 Replies
View Related
Feb 11, 2008
Hi Guys,I have a quick question about DataReader, I have a function called "ExportTotal" i am calling this function from another function. what it does is it will put the Total for each Network in the Line 34. Right now what it is doing is It is putting the First Networktotal,2ndNetwork total,3rdNetwork total....... in the line 34. what i want is if the control comes to first network then it has to put only 1st network total and for the 2nd network only 2nd network total and so on. Please see my function below. Can you guys tell me what i am doing wrong?ThxPrivate Function exporttotal() As String Dim sql As String Dim dbFunctions As New DatabaseUtilities Dim tempinvoicetotal As String 'Dim rateactuals As String Dim filetext As String Dim tempclientname As String Dim strconn As String Dim prev_network As String = "" Dim current_network As String = "" strconn = CONNECTIONSTRING sql = "SELECT CAST(SUM(tblSpot.rateActual) AS int(4)) AS Rateactuals, SUM(tblSpot.rateActual * 0.85) AS netrate, SUM(tblSpot.rateActual * 0.15) AS commrate,TBLCLIENT.CLIENTNAME " & _"FROM tblSpot INNER JOIN tblContract ON tblSpot.fkContract = tblContract.pkid INNER JOIN " & _ " tblClient ON tblContract.fkClient = tblClient.pkid WHERE tblSpot.fkContractType = 'UNWIRED' AND " & _ "fkInvoiceNumber = '" & Me.txtinvoicenumber.Text & "' GROUP BY TBLCLIENT.CLIENTNAME" Dim myConn As New SqlConnection(CONNECTIONSTRING) Dim myCommand As New SqlCommand(sql, myConn) myConn.Open() Dim dbreader As SqlDataReader = myCommand.ExecuteReader() While dbreader.Read() Try Dim Rateactuals As String If dbreader("Rateactuals") Is DBNull.Value Then Rateactuals = "" Else Rateactuals = dbreader("Rateactuals") tempinvoicetotal = Rateactuals End If Dim clientname As String If dbreader("clientname") Is DBNull.Value Then clientname = "" Else clientname = dbreader("clientname") tempclientname = clientname End If If prev_network = "" Then filetext = filetext & vbCr & "34;;" & tempinvoicetotal & "00" & ";"Session("EDIExport4") = filetext prev_network = tempclientname Else current_network = tempclientname If prev_network <> current_network Then filetext = filetext & vbCr & "34;;" & tempinvoicetotal & "00" & ";"Session("EDIExport4") = filetext prev_network = tempclientname Else End If End If Catch SqlEx As SqlClient.SqlException Session("Error") = SqlEx.Message.ToString Response.Redirect("Error.aspx?Form=" & Request.Path) Catch Ex As System.Exception Session("Error") = Ex.Message.ToString Response.Redirect("Error.aspx?Form=" & Request.Path) End Try dbFunctions = Nothing End While myConn.Close() End Function
View 5 Replies
View Related
Mar 19, 2001
Log Reader:
The process could not execute 'sp_repldone/sp_replcounters' on 'prdSQL01'.
I have configured replication locally; from prdSQL01 to prdSQL01 in order to
troubleshoot this problem.
Is the problem is local to the box?????????
Do I need to re-install MSSQL SERVER? CORRUPT INSTALL????
HELP IS DESPERATELY NEEDED. APPRECIATE ALL SUGGESTIONS.
THANKS
SAM
View 4 Replies
View Related
Aug 31, 2001
Is there a way I can view the transaction log mean I want to see the transactions occurred during the last few hours before the commit? And is there a way to capture all the logins who access the DB
View 1 Replies
View Related
Jun 22, 2004
We restored a database with replicated tables. Now, the Log Reader Agent will not run. This displays:
"The process could not execute 'sp_repldone/sp_replcounters' on 'ourservername'."
In Error Details for the agent:
"The process could not set the last distributed transaction."
And, from the logs:
"ForwardLogBlockReadAheadAsync: Operating system error 998(Invalid access to memory location.) encountered."
Does anyone know how we get the Distribution database and the Log Reader running again?
It is only affecting Transactional replication (not snapshot or merge).
View 4 Replies
View Related
Apr 19, 2004
There have been deleted several records from a table and i want to know who did it. Is there a free transactionlog reader to find out?
Marcel
View 2 Replies
View Related
Sep 27, 2005
hi,
i've performed a test on 2 machines based on the topic above, but it doesn't seem like blocking each other... This is the context...
I've created a table call TEST_DEL i.e.
quote:CREATE TABLE test_del
(v_id INT,
desc CHAR(3)
)
In machine 1, i'm login as USER 1 and try to insert a set of records into the table
quote:
Machine 1
~~~~
BEGIN
DECLARE @li_num int,
@li_start int
SET @li_num = 100000
SET @li_start = 1
WHILE @li_start < @li_num
BEGIN
INSERT INTO test_del VALUES (@li_start, 'zzz', 'xxx')
IF (@li_start > @li_num)
BREAK
ELSE
SET @li_start = @li_start + 1
CONTINUE
END
END
In machine 2, i login in as USER 2 to retrieve the records at the same time...
quote:
SELECT * FROM test_del
but, the system still allow me to retrieve the records at the same time... May i know when will "Writer block reader, reader block writer" occur and in what situation
Thanks in advance
View 1 Replies
View Related
Feb 15, 2006
HELP>>> I am getting desperate
we recently had a failure which ended up wrecking my replication. The basic layout is from a source server -> Distribution Server then out to several other servers. Long story short the distribution database had to be moved to a new drive and I am now getting the following error message
The specified LSN (0003d4f0:0000721e:001b) for repldone log scan occurs before the current start of replication in the log (0003d63a:00002803:0001).
(Source: fsdpdcis (Data source); Error number: 18768)
---------------------------------------------------------------------------------------------------------------
The process could not set the last distributed transaction.
(Source: fsdpdcis-DPDDATA-1 (Agent); Error number: 22017)
I have reinitialized all subscriptions on the fsdpdcis server and run subscription validation (with no response). The data did re-load during the reinitialization but does not seem to be getting updated. This is driving me crazy and I am desperate. Any suggestions would be greatly appreciated. I have search MS knowledge base with no results and BOL has not been any help so far.
Thanks
Steve
View 4 Replies
View Related
Jan 5, 2007
Does anyone happen to know if there is a raw file reader utility available? One of my processes drops a couple of interim raw files and I'd like to be able to look at the data in them in a columnar format without having to run a downstream data flow with a reader inserted.
View 8 Replies
View Related
Feb 29, 2008
I have an extremely simple (couldn't be simpler) WML query that I'm trying to use to populate a variable, and no matter what I try, I keep getting:
Error: 0xC002F304 at WMI Data Reader Task, WMI Data Reader Task: An error occurred with the following error message: "Invalid query ".
Here is exactly how I have the connection manager and task set up:
WMI Connection Manager:
ServerName = "\localhost"
Namespace = "
ootcimv2"
UseWindowsAuth = True
WMI Data Reader Task:
WmiConnection = WMI Connection Manager
WqlQuerySourceType = Direct input
WqlQuerySource = "SELECT Name FROM CIM_Datafile WHERE Name = 'C: est.txt'"
OutputType = Property value
OverwriteDestination = Overwrite destination
DestinationType = Variable
Destination = User::WmiVariable
I've tried setting the WmiVariable to both String and Object data types. I've tested the WMI connection (both within SSIS and through a sample VBS script), and that works just fine.
Any ideas?
Thanks in advance.
Jerad
View 1 Replies
View Related
Mar 14, 2006
Hi,
I need to load data from excel files which will be provided by a number (around 100 monthly) of external suppliers, so we don't get 100% control over the files themselves.
What my solution involves is copying the excel file to a common name (e.g. supplierExcel.xls), turning this into a pipe delimited txt and then loading the txt. I had trouble switching files when trying to load directly from excel.
All these files should arrive in the same format of 36 fields and of course in the right order; there will be rejections if they fail.
I've come across a problem extracting the data from excel where I'm getting 'the value could not be converted because of a potential loss of data' on field 1. It only happens on excel files where there is a quote mark as the first character and I have loaded other files quite happily without the quotemark.
Has anyone seen this before? Is this a known issue and how can I get around it, without recourse to manually changing the individual files?
Thanks
nathan
View 1 Replies
View Related
Feb 13, 2008
I have a SSIS package that pulls fact data from Progress 10.1B database. Midway through the pull (around 10,000 records), it bombs out with the following error. I have'nt a clue as to what it means. Could someone help me out? Thanks in advance.
[DTS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "DataReader Source" (1) returned error code 0xC02090F5. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
[DTS.Pipeline] Error: SSIS Error Code DTS_E_THREADFAILED. Thread "SourceThread0" has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited.
[DTS.Pipeline] Error: SSIS Error Code DTS_E_THREADCANCELLED. Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown. There may be error messages posted before this with more information on why the thread was cancelled.
[DTS.Pipeline] Error: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread0" has exited with error code 0xC0047039. There may be error messages posted before this with more information on why the thread has exited.
[DTS.Pipeline] Information: Post Execute phase is beginning.
View 8 Replies
View Related
Apr 26, 2008
Hi ,
I have a situation where i need to read data from one table and and the result that i get i pass it thru a where clause in another query for which i need to read the database again. Problem iam phasing is with the Sqldatareader in a while loop . When iam trying to open a SqlDataReader with in a SqlDataReader iam getting an error that i need to close the data reader that i have already opened. Is there a way to solve this problem
Code:
public void fnIduction()
{
//Calculating the Deduction of Individual Employees
//Select from the EmployeeMast tableSqlCommand cmdEmp2 = new SqlCommand("select EmpCode,EmpName,DesigCode,DeptCode,BankCode,PFNo,PanNo,BankAcNo,GS,ESINo,PayrollGroup,LICNo,CategCode from EmployeeMast", cn);
cn.Open();SqlDataReader dr02;
dr02 = cmdEmp2.ExecuteReader();while (dr02.Read())
{strEmpCode = dr02["EmpCode"].ToString();
//Select from MondedPay,Deduction tables (Variable Deductions or Monthly Deductions)SqlCommand cmdDed02 = new SqlCommand("Select MondedPay.EmpCode,MondedPay.DedPayCode,Deduction.Name,MondedPay.DedPayMonth,MondedPay.DedPayYear,MondedPay.DedPayAmount from MondedPay,Deduction where Deduction.Code=MondedPay.DedPayCode and EmpCode='" + strEmpCode + "' and MondedPay.mType =1 ", cn);SqlDataReader drDed02;
drDed02 = cmdDed02.ExecuteReader();while (drDed02.Read())
{
strMonDedNam = drDed02["Name"].ToString();dobMonDedAmt = Convert.ToDouble(drDed02["DedPayAmount"].ToString());if (intDedPer == 1)
{
dobMonDedAmt = (dobDedAmt * dobBasic) / 100;
dobMonDedTot = dobMonDedTot + dobMonDedAmt;
}
else
{
dobMonDedTot = dobMonDedTot + dobMonDedAmt;
}
}
drDed02.Close();
}
dr02.Close();
cn.Close();
}
View 6 Replies
View Related
Aug 2, 2001
Unable to start log reader agent after being manually stopped.
Any ideas.
View 1 Replies
View Related
Jul 23, 2002
Hi
By default, the Log Reader Agent and Distribution Agent use the account the starts SQL Server Agent to logon into the Publisher SQL Server when performing SQL Server Transactional replication. Is there a way of configuring them so they use a different account.
Thanks
Tariq
View 1 Replies
View Related
Apr 30, 2015
In ReplMon, some Log Reader agent jobs display as "not running". Rigt-clicking on it the only option is to "Stop" the agent. Seems to me if it's NOT RUNNING you should be able to Start it but that option is disabled. Also, looking at the Agent Job Activity Monitor on the distribution server it says that the job is currently executing.
Running the Replication Agents Checkup job yields nothing and those jobs are still "not running". I can easily Stop/Start the Log Reader in ReplMon or insert a tracer token and then all looks fine. I'm just puzzled by the inconsistency and wondering how I can programmatically check and resolve it.
View 0 Replies
View Related
Feb 28, 2007
Greetings SSIS friends,
I have tried using a sql command for my data reader source. I added the following expression to my datareader source :
"select * from result where result_id > " + @[max_result_id]
but I get the following error message :
The SQL command has not been set correctly. Check SQLCommand property.
I then got rid of the variable (defined at package level) and replaced it with a string like so :
"select * from result where result_id > " + "123456"
but I still get the same error message!
What am I doing wrong?!
Please advise.
View 20 Replies
View Related
May 1, 2008
Can anyone provide an example or point me to an article that explains how to programmatically set the SQL command for a data reader. I am using a data flow task in a For Loop Container and want to change the SQL command for each loop based on the data from the previous.
Any help is greatly appreciated.
View 5 Replies
View Related
Apr 7, 2006
I recently set up transactional replication from one server database to another server database. I keep getting a Log Reader Agent error: An access violation occurred.
The SQL Server agent starts under one Windows account but the Server is registered under the system account. The log reader agent is using the system account.
I'm not sure what else to check or what database permissions or roles should be set. Can somebody help? Thanks.
View 5 Replies
View Related
Aug 31, 2007
Hi,
maybe you can help me with a little SSIS task. I want to fetch some wmi infos from serveral servers with the wmi reader. to read something is no problem, but whats the best way to bring them to a table or the control flow? Read from the generated file cant be a way. I also tried the variable. How do I get them to data flow. I tried a script task but i cant read the resultset. What format has the variable? ado.net, ado?
Whats the best way to get the results into a table?
regards
andreas
View 4 Replies
View Related