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
 
thnks
div 

View 1 Replies


ADVERTISEMENT

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

Need Help With Taking Data From A Card Reader And Storing It Into SQL Server 2005

Feb 7, 2007

I'm using a Hemisphere West MSR-152 card reader. I need to take data from the reader and store it into SQL Server 2005 Express. Can anyone give ideas on how to do this (sample code recommendations). I'm using visual studio 2005 express and I code with VB.NET.

View 3 Replies View Related

NULL Values Returned When Reading Values From A Text File Using Data Reader.

Feb 23, 2007

I have a DTSX package which reads values from a fixed-length text file using a data reader and writes some of the column values from the file to an Oracle table. We have used this DTSX several times without incident but recently the process started inserting NULL values for some of the columns when there was a valid value in the source file. If we extract some of the rows from the source file into a smaller file (i.e 10 rows which incorrectly returned NULLs) and run them through the same package they write the correct values to the table, but running the complete file again results in the NULL values error. As well, if we rerun the same file multiple times the incidence of NULL values varies slightly and does not always seem to impact the same rows. I tried outputting data to a log file to see if I can determine what happens and no error messages are returned but it seems to be the case that the NULL values occur after pulling in the data via a Data Reader. Has anyone seen anything like this before or does anyone have a suggestion on how to try and get some additional debugging information around this error?

View 12 Replies View Related

SQL Server 2005 Integration Service (SSIS) Reading HTTP Data

Jan 16, 2008



I need to read in general web pages (not a web service) from a typical web site using SSIS and make it available for other SSIS transformations (Script Component). I tried using the XMLSource data source but this appears to require well formed XML, and will not accept HTML which is what I am likely to be getting from the web pages.
I tried a HTTP Connection Manager with a DataReader Source, but seems to only accomodate web services.

Can this be done? If someone has an example (tutorial) of how to accomplish this I would greatly appreciate a copy.
James

View 1 Replies View Related

Problems Reading Data From Linked Server To Excel In SQL Server 2005

Oct 4, 2007

I have an Excel sheet that is dynamically updated (through DDE) and I want to import this data to a table in SQL Server 2005. Using SQL Server Management Studio to configure an Excel data source as a linked server.
(http://support.microsoft.com/kb/306397/EN-US/)

Following the first 5 steps should let me acces the table (but I cannot view the data in SQL Server 2005). However, I could not find how to export the data into an existing table. Does anyone know how or can give a pointer to document describing how to do this?

View 8 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

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 Or Data Adapter With Data Set?

Dec 4, 2007

I have used both data readers and data adapters(with datasets) in the projects that I have worked on. I am trying to get some clarification on when I should be using which one. I think I am doing this correctly but I want to be sure I am developing good habits.

As the name might suggest, it seems like a datareader is for only reading data. I have read that the data adapter and dataset are for a disconnected architecture. Or, that they can be used for this type of set up. I have been using the data adapter and datasets when writing to a database and the datareader when reading from a database.

Is this how these should be used? Is the data reader the best choice for reading data? Am I doing this the optimal way from a performance stand point?

......................................................thanks in advance

View 1 Replies View Related

Reading XML Data From Another Server

Mar 24, 2008


Not sure if I am posting this in the correct placed. Here is what I am trying to do. Read an xml files which is very large and is our store xml file. I want to import this data into a database nightly. I can down load the file and I have noticed that it has one line in it that will keep me from reading it: <!DOCTYPE StoreExport SYSTEM "http://..../doc/dtd/StoreExport.dtd"> Once I removed this line I can get the data needed to go into the database. I would removed the old table first then replace it with the information from here.

Can anyone help. I hope I have given enough information for this type of issue. I was told integration services would do this, but I am not sure how. Could someone point me in the right direction.

Thank you for any an all help.

Dee

View 13 Replies View Related

Reading XML Data From Another Server

Mar 24, 2008

Not sure if I am posting this in the correct placed. Here is what I am trying to do. Read an xml files which is very large and is our store xml file. I want to import this data into a database nightly. I can down load the file and I have noticed that it has one line in it that will keep me from reading it: <!DOCTYPE StoreExport SYSTEM "http://..../doc/dtd/StoreExport.dtd"> Once I removed this line I can get the data needed to go into the database. I would removed the old table first then replace it with the information from here.

Can anyone help. I hope I have given enough information for this type of issue.

Thank you for any an all help.

Dee

View 4 Replies View Related

Problems With Reading Data Through DTS SQL Server 2000

Mar 13, 2007

Hi,
I am trying to read data from a column of an excel file which contains numbers in some cutom format _($* #,##0.000_);_($* (#,##0.000);_($* "-"??_);_(@_)

When I click on the preview button in the transformation properties I am not able to see any data in this column.

Please let me know if there is any setting in DTS which would allow me to read data in any format in the excel file.

Thanks!!
Rajan

View 2 Replies View Related

Reading Data From Navision To SQL Server: Date Issues

Jul 23, 2005

Hi:I'm trying to read data from Navision 2.60 ERP with own database to aSQL Server 2000 database via ODBC. All is working except just onething, how to filter data with a date field.I have some big tables that have a date field and I just want to readdata from one or few days, not all the table, cos I will be doing thisevery day (datawarehousing).If I write in my SQL Server DTS:SELECT *FROM MYNAVISIONTABLEWHERE (MYDATE = { d '2005-06-30' })It works! This notation is the one required by C/ODBC Navision driver.Now I want to change 2005-06-30 for something like "sysdate" or "today"or similar... to execute this all days.... any ideas?THANK YOU,RegardsFran

View 2 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

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

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 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

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

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