WMI Data Reader Task Failed

Oct 16, 2006

Hi guys,

I don't know why on earth. It only inform this: [WMI Data Reader Task] Error: An error occurred with the following error message: "Invalid query ".

My query is a simple one, very well-know for all of us:

strComputer = "SRVDESASQL2005"

Set wbemServices = GetObject("winmgmts:\" & strComputer)
Set wbemObjectSet = wbemServices.InstancesOf("Win32_LogicalMemoryConfiguration")

For Each wbemObject In wbemObjectSet
WScript.Echo "Total Physical Memory (kb): " & wbemObject.TotalPhysicalMemory
Next


Let me know any comment or thought, I'm just a beginner with WMI.



TIA.

View 2 Replies


ADVERTISEMENT

WMI Data Reader Task Painfully Slow

Nov 16, 2006

HI,

I am query event log information for a single day using WMI Data reader task and it is taking for ever. I am querying event log for remote servers but the server exectuing the process and queried servers both are in the same domain.

Kindly advise.

Thanks

Shafiq



View 2 Replies View Related

Script Task User Defined Variable And Data Reader Source SQL Statement

Jan 12, 2007

Hello,

Please can anyone tell me if or how I have to cross reference to a user defined variable from a script task in the SQL of a Data Reader Source?



The script task creates a variable for the last Sales Ledger Session. The SQL in the data reader source that updates the DW sales invoice lines file based upon those invoice lines where the session number is greater than the value from the script task.



The SQL command in the custom properties doesn't cross reference back to the variable.



If anyone can help or needs further detail to help please post a resonse.

Thanks,

Marcus Simpson

View 4 Replies View Related

Queue Reader Agents Failed - SQL 200 Replication

Jan 19, 2006

Guys,

I get the error message: Queue reader aborting. The steps failed...in queue reader agents of SQL 2000 replication. Could any one give me a hint of how to troubleshoot this problem? Thanks a lot in advance.

View 1 Replies View Related

DTS-data Driven Task, Repeat N Times If Failed

Aug 25, 2006

Hi,
I have one data driven task set up in my DTS package. for some reason the connection to data source is not available when my package is scheduled to run,which fails the package.
is there a way, I can set the task to try to execute again after a couple of minutes or 5 mins, maybe a predefined number of times before it fails the package?
Thanks & Regards
Naseem

View 2 Replies View Related

The Attempt To Add A Row To The Data Flow Task Buffer Failed

Aug 10, 2006



Hi,

I am trying to transfer the data from flat file to sql server.When I am running the package on local server(network server) it works fine.But when I use it to transfer the data to online server it starts and shows 2771 rows transfered and remains on that only, dosent stop or give a error. When i stop the execution I get the following errors:



[DTS.Pipeline] Error: The pipeline received a request to cancel and is shutting down.



[Loose Diamond File [1]] Error: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.



[DTS.Pipeline] Error: The PrimeOutput method on component "Loose Diamond File" (1) returned error code 0xC02020C4. 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.



[DTS.Pipeline] Error: Thread "SourceThread0" has exited with error code 0xC0047038.



Can any one help me to find what the problem is.

Thanks in advance.

View 4 Replies View Related

Foreach Loop, Data Flow Task Buffer Failed

Jun 5, 2006

I have a package that runs fine by itself. But when I run it inside a Foreach Loop container on a parent package, I got a buffer error after a few loops. Here are a couple of the error lines:

A buffer failed while allocating 49085616 bytes.

The attempt to add a row to the Data Flow task buffer failed with error code 0x8007000E.

I already played around with the Data Flow task€™s DefaultBufferMaxRows and DefaultBufferSize properties, and I am still getting the error. Just wondering if there is a memory leak or something with the Foreach Loop task. I haven€™t install SP1. Maybe SP1 fixes this issue?

View 3 Replies View Related

The Attempt To Add A Row To The Data Flow Task Buffer Failed With Error Code 0x8007000E

Mar 5, 2008



Hi Everyone-

i am facing a memery problem error while i am running the SSIS package
while i am running the package it show the following Error

In Spend Dataload package: A buffer failed while allocating 70485760 bytes.

--------------------------------------------------------------------------------
In Spend Dataload package: The system reports 54 percent memory load. There are 3747647488 bytes of physical memory with 1694883840 bytes free. There are 2147352576 bytes of virtual memory with 1061253120 bytes free. The paging file has 7328251904 bytes with 5083856896 bytes free.

--------------------------------------------------------------------------------
In Spend Dataload package: The attempt to add a row to the Data Flow task buffer failed with error code 0x8007000E.

--------------------------------------------------------------------------------
In Spend Dataload package: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Flat File Source" (2718) returned error code 0xC02020C4. 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.

--------------------------------------------------------------------------------
In Spend Dataload package: 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.

--------------------------------------------------------------------------------
In Spend Dataload package: 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.

--------------------------------------------------------------------------------
In Spend Dataload package: 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.


is there anyone know the solution of that problem and please dont tell me to use extra memery or a hardware solution as this option is not available.

thanx
Maylo

View 5 Replies View Related

SqlDataReader Reader Connection Closing Before Dt.Load(reader)

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

Maitenace Plan Check Database Integrity Task Fails With Failed:(0) Alter Failed For Server 'xyz'

Feb 21, 2008



Hi,



I am administering several SQL Servers running SQL Server 2005 SP2 Build 3042.
I have a common maintenance plan that runs on each of the servers. The maintenance plan runs
fine on all the servers except for one. On the one server the Database Integrity check fails with the following error:


Check Database integrity on Local server connection
Databases: <list of databases>
Include indexes
Task start: 2008-02-21T00:05:42.
Task end: 2008-02-21T00:05:46.
Failed0) Alter failed for Server €˜XYZ€™

I created a test maintenance plan to just do the integrity check and selected one database only and this also failed with the same error message. I ran this test maintenance plan and configured it for each of the databases in question and it failed each time.
If I run the DBCC manually against the databases they all report fine.


I read some of the post that talked about the €œAllow Updates€? being set incorrectly but that does not apply to my problem since my configured and run values are set to 0.

Does anyone know what the problem could be?

View 23 Replies View Related

Pipeline Error-excel Source-data Reader Does Not Read In Meta Data

Apr 16, 2008

Hi all, i got this error:


[DTS.Pipeline] Error: "component "Excel Source" (1)" failed validation and returned validation status "VS_NEEDSNEWMETADATA".

and also this:

[Excel Source [1]] Warning: The external metadata column collection is out of synchronization with the data source columns. The column "Fiscal Week" needs to be updated in the external metadata column collection. The column "Fiscal Year" needs to be updated in the external metadata column collection. The column "1st level" needs to be added to the external metadata column collection. The column "2nd level" needs to be added to the external metadata column collection. The column "3rd level" needs to be added to the external metadata column collection. The "external metadata column "1st Level" (16745)" needs to be removed from the external metadata column collection. The "external metadata column "3rd Level" (16609)" needs to be removed from the external metadata column collection. The "external metadata column "2nd Level" (16272)" needs to be removed from the external metadata column collection.


I tried going data flow->excel connection->advanced editor for excel source-> input and output properties and tried to refresh the columns affected.
It seems that somehow the 3 columns are not read in from the source file?
ans alslo fiscal year, fiscal week is not set up up properly in my data destination?
anyone faced such errors before?

Thanks

View 13 Replies View Related

Truncation Of String Data With Data Reader Source Connecting To ODBC DSN

Mar 18, 2007

A data reader is using a connection manager to connect to an ODBC System DSN . A query in the SqlCommand property is provided. Data is being truncated in the only string column . The data type in data reader output-->external columns shows as Unicode string [DT_WSTR] Length 7.

The truncated output in a text file is the first 3 characters from left to right . Changing the column order has no effect.



A linked server was created in SQL Server Management Studio to test the ODBC System DSN using the following:

EXEC sp_addlinkedserver
@server = 'server_name',
@srvproduct = '',
@provider = 'MSDASQL',
@datasrc = 'odbc_dsn_name'

Data returned using "OPENQUERY" does not truncate the string column indicating that the ODBC Driver returns data as expected with sql 2005, but not with the Data Reader.

Any assistance would be appreciated.

Thanks,

View 3 Replies View Related

Reading Data Using Data Reader With Sql Server 2005 Conn

May 3, 2007

Hi  I have written a piece of code for Login form which reads the user id and password from db. It works fine with the Sql server 2000 but I get a error with Sql server 2005.   SqlConnection conn = new SqlConnection("Data Source=D\SQLEXPRESS;Initial Catalog=model;Integrated Security=True");        SqlCommand cmd = new SqlCommand("Select * from JsLoginDetails", conn);        conn.Open();        SqlDataReader dr = cmd.ExecuteReader();                                  while (dr.Read())        {            if ((Login1.UserName == dr.GetValue(0).ToString()) && Login1.Password == dr.GetValue(1).ToString())            {                Response.Redirect("MainJs.aspx");            }            else            {                Login1.FailureText = "Invalid Userid Or Password";            }        }        dr.Dispose();        conn.Close();    } I get and error Invalid object name 'JsLoginDetails'.  pls help thnksdiv 

View 1 Replies View Related

Inconsistent Result Using Data Reader Source To Get Data From DB2

Apr 22, 2008

I am having a very wierd issue regarding a DB2 sql query. I need to get data from Db2 and insert into our sql server database. Using data flow task, to get data I am using the data reader source. COnnection is ado.netodbc connection.
THis sql query also has some comments in it.

The first wierd thing is...

1. On Development server, when I run this query manually, meaning using toad, winsql (connection to the db2 database), the query runs fine. Brings back approx 667 rows which is correct. ON the same server when I try to run this query, via a SSIS pkg, data flow task, using data reader source, gives me error on those comments that exist in that query. But if I run the same SSIS pkg on another server (Integration server). It runs fine. The same pkg also runs fine if I run it from my machine. SO What is different on my Dev server compared to the Integration server.

2. Say if I take those comments out from the sql query, then try to run the ssis pkg. The query is stuck at the first record and goes in an infinite loop mode. though my query is not a procedure, it is just a sql statement. But this ssis pkg with the query runs absolutly fine on the other server. I aslo tried using the other types of connection and ole db source but still the same problem on the Dev server.

What do I need to look for that is so different on the dev server compare to the INT server. I also checked the version on both these server for Visual Studio 2005(by going to About Microsoft Visual Studio), it is the same.

This is what I have on both the servers....
Microsoft SQL Server Integration Services Designer
Version 9.00.3042.00


Please HELP !!!!

Thank you.
Jinita

View 5 Replies View Related

Data Reader Source In Data Flow Problem

Jul 18, 2006

hi all,

i have a package in ssis that needs to deliver data from outside servers with odbc connection. i have desined the package with dataflow object that includes inside a datareader source. the data reader source connect via ado.net odbc connection to the ouside servers and makes a query like: select * from x where y=? and then i pass the data to my sql server. my question is like the following:

how do i config the datasource reader or the dataflow so it will recognize an input value to my above query? i.e for example:

select * from x where y=5 (5 is a global variable that i have inside the package). i did not see anywhere where can i do it.

please help,

tomer

View 11 Replies View Related

Data Reader ?

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

Data Reader

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

Integration Services :: Data Flow Task Failed After Loading 29000 Rows Out Of 234567 Rows

Oct 13, 2015

I am facing an issue that Data flow task failing after loading 29000 rows out of 2lakhs rows.

I am loading data from .csv file to OLE DB Destination.

This data flow task is placed inside For each loop container.

is this issue because of any performance issue in SSIS packages such as buffer size.

find the error below:

DFT Load Data from FlatFile:Error: The conditional operation failed.
DFT Load Data from FlatFile:Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. 

The "DER Add Calc Columns" failed because error code 0xC0049063 occurred, and the error row disposition on "DER Add Calc Columns.Outputs[Derived Column Output].Columns[M_VALUE_NUM]" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.

DFT Load Data from FlatFile:Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "DER Add Calc Columns" (48) failed with error code 0xC0209029 while processing input "Derived Column Input" (49). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.

[code]....

View 8 Replies View Related

Data Reader Problem

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

Data Reader Problem

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

Data Reader Question

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

WMI Data Reader Issue

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

Multiple Data Reader Problem

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

Using Variables In A Data Reader Source

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

Use An Expression To Set The SQL Command For A Data Reader

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

WMI Data Reader With Output To Table

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

Data Reader Source Cannot Be Configured

Jan 31, 2006

Hi,

I am using a Ado Connection Manager to connect to a M S Access source.

But when I use this connection Manager in Data Reader Source, I am Not able to Configure Data reader Source. It gives exception "Cannot Acquire Managed Connection From Run Time Connection Manager".

Can anyone help on this.

Thanks

Dharmbir





View 10 Replies View Related

How To Call A Variable In ADO.NET Data Reader

May 2, 2008


Hello everybody.

I recently started a short topic about staging an incremental load, and the answer was to use a variable. I've been fiddling around with it have run into a question about calling the variables.

I've gotten my "Execute SQL Task" to generate a single row result set and store it as a global / package Variable. Now I'm not sure how to call / use this variable when I'm loading data from an ADO.NET Data Reader Source.

Do I need to map the variable to a parameter first? Can I call the variable in the SELECT statement like this?



Code Snippet
SELECT *
FROM source
WHERE date > @variable




I was reading an MSDN page on Using Variables in Packages where they recommended the following syntax:



Code SnippetSELECT * from Production.Product WHERE ProductID = ?




But I'm not sure how to get the variable or parameter mapped to my Data Reader Source.


Any help would be greatly appreciated.
Thanks in advance,

- Trevor

View 6 Replies View Related

Data Reader Problem Reading NULLS

Feb 20, 2008

Hello,
I have a datareader and whenever the value that it is suppose to display in the Label is empty because there is no Data Entered Yet I gives me and error and I have the event set ONLOAD so the page with no data to disply does not load.
So the Ranking.text = a select statement i have, but when I dont have any data into the SQL database there is nothing to SELECT so the program gives of an error.
Can someone help me with this. Thank you.
Here is the code: Dim objReader As SqlDataReader
conn.Open()
objReader = comm.ExecuteReader()
objReader.Read()lblRanking.Text = objReader("Rating")
objReader.Close()

View 7 Replies View Related

Stored Procedure With Select, How To Use It With Data Reader?

Oct 6, 2006

I've created some store procedure for use with Insert. This works great. Now I'd like to be able to use Select statement so I can get the data in some textboxes.

Right now I use Select with SqlCommand and DataReader. This works fine, but I'd like to learn with Stored Procedure with this.

What do I put in the stored procedure to return found records and how what code should I use after executenonquery?

View 3 Replies View Related

Data Reader Source As ODBC / Complex Sql

May 30, 2007

Hello All,



How do I get columns to output when I have a data reader source? My connection is an ODBC and does complex sql. I am connection to a Netezza database and I would like to execute a very complex query, but in essence does



Create newtable as

(select day, sessionId)

from source

// lots of other joins and unions



select day, sessionId from newtable





drop newtable



I have an ODBC connection and I have a Datareader source, I cannot connect this source to my SQL Server destination because no output columns are available. What am I missing here?



Are there any good examples of this, taking data from a ODBC source into SQL server?



Thanks in advance.

View 5 Replies View Related

SSIS Data Reader Error Re-direct

Feb 18, 2008

Hi I'm currently trying to create a few DTS packages that Import some very wide tables, Im using an ODBC data source into a Data Reader. I want to re-direct any errors into an error destination. The problem I've got is that I can go in and set each column to redirect but was hoping I could select or specify that this needs to happen for all the rows? Does anyone know if this is possible and if so how I go about it?

Many thanks....

View 1 Replies View Related

Passing Variables To Data Reader Source

May 22, 2007

I am running a sql task which will pass table as object variable to the result set

I have a for each loop container which is used to loop for all the servers. I use two of the parameters to establish connection string in the for each loop task from the reasult set variables.



Now my next step is a data flow task (Data Reader Source) where i have to run a query but the table name and column names are dynamic and i dont see an option to call variables.

can someone tell me if this is possible (var1,var2,... are variables in the package scope)



select var1, var2 from var3.var4

where var5 = 'y'

View 9 Replies View Related







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