|
by: Ricola ! |
last post by:
Why do I say:
SqlDataReader dr;
instead of
SqlDataReader dr = new SqlDataReader();
|
by: Matthias S. |
last post by:
Hi,
I've written a simple app which should just fetch some data from a
database and render the results into a ListView.
In order to not freeze the GUI, I'm using a BackgroundWorker. The
arguments for the RunWorkerAsync are the Query to be executed and the
Connectionstring. As a result I hoped I could return a SqlDataReader.
The problem is, if I create the SqlDataReader within the
|
by: Franck Diastein |
last post by:
Hi, when I call ExportData I have this error:
Invalid attempt to Read when reader is closed.
Telling me that there's a problem with this line:
while(_dataR.Read()){
Code:
*************************************************
public void Export2CSV(){
|
by: Neil Guyette |
last post by:
Hello, Everyone,
I'm trying to find information on how to populate a combo
box using a SqlDataReader. I want to be able to set the
value of the combo's value property different then the
combo's text property (what the user will see). Is this
possible with a SqlDataReader?
Thanks
|
by: Arvind P Rangan |
last post by:
Hi All,
How do you get all the values of a sqldatareader if it
contains multiple resultset.
Using sqldatareader.nextresult and sqldatareader.read
e.g.
While sqldatareader.read '
If not sqldatareader then
sqldatareader.nextresult
|
|
by: bidllc |
last post by:
I have a funtion that works fine and dandy when called from anywhere in my
app. It will NOT work when called from inside the class in which it resides.
This is the function I'm calling: "getProductByID(productID)" from inside
another method in the same class. See below.
This line throws a null ref exception:
While dr.Read()
Thanks for any insight!
|
by: mimi |
last post by:
Hi
Please help me out, I can't find a way to close a sqldatareader when error
occur at statement cmd.ExecuteReader(). I can't close it in catch because
it is local in try scope and I can't declare it outside try scope either
since we have to call cmd.executeReader to create sqldatareader
public string GetLogs(int logID)
{
|
by: Agnes |
last post by:
I got two sub method to check some history record, Now, I found that there
is some problem in Sub2() .
I think the problem is about the myReader. However, I got no idea to solve
it . As Sub2() will be used by another function. I cannot combine them ,
Please help. Thanks a lot.
private Sub Sub1()
Dim cmd As New SqlClient.SqlCommand("select invno from
arinvinfo , _conn)
Dim myReader As SqlDataReader
myReader = cmd.ExecuteReader
|
by: Web learner |
last post by:
I am trying to create a method GetDataFor(string column) becaues I have to repeat the same statements for several columns but I get an error as follows:
The name 'dr' does not exist in the current context
It seems the dr -the instance of sqlDataReader - is not becoming available to the method. How to make it available? This seems trivial and newbie problem related to OOP, but I am confused. Could you pl. look at the code or point me to...
|
by: yogarajan |
last post by:
hi i am using two sqldatareader. that gives error
My code start here
SqlConnection conn = new SqlConnection("Data Source=**********;Initial Catalog=****; User Id=****; Password=******");
conn.Open();
//collect all employee//
SqlCommand cmd = new SqlCommand("Select * from tblhrims_employeedetail where nvrresigned='no'",conn);
SqlDataReader sqldr = cmd.ExecuteReader();
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|