|
by: Rod |
last post by:
Thanks in advance.
I have two listboxes on a single asp page. I am trying to
use sqldatareader to populate both using two seperate sql
stored procs. I can populate each box seperately using
two different methods but when I try to populate them both
no the same page I get "InvalidOperationException: Invalid
attempt to FieldCount when reader is closed"
WHY???
|
by: Ricola ! |
last post by:
Why do I say:
SqlDataReader dr;
instead of
SqlDataReader dr = new SqlDataReader();
|
by: PeteZ |
last post by:
I'm having a problem where I exec a stored procedure (which SELECTs all rows
from a table, which has 100 rows) - each row has 8 columns.
When I exec the code (see below) I get 8 in oSQLDR.FieldCount (which I
expect but whenever I try and reference the data in the row
(oSQLDR.GetInt32(0);) I get an exception "invalid attempt to read when no
data is present". If I exec the SP in an ISQL window using: EXEC getEvents,
I get 100 rows...
|
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: Wing |
last post by:
Hi all,
I execute a stored procedure in my C# code, assign the result to the
SqlDataReader object and display it with datagrid.
the question I like to ask, is possible to edit the datagrid output
(eg. delete a row in the datagrid) and update the change in the
corresponding table in the database?
thanks for your time.
|
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: 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: SQL |
last post by:
I'm new at this, so please forgive me if my question has a simple answer to
it.
I'm trying to get a value out of a SqlDataReader. Here is my code to do so:
Dim mySQLCommand As New SqlCommand("SELECT NextPrbKey FROM SystemAdmin", cn)
Dim mySQLReader As SqlDataReader = mySQLCommand.ExecuteReader()
intGetNextKey = mySQLReader.GetValue(0)
This does not return a value. I thought that GetValue(0) would return the
|
by: Frank Milverckowitz |
last post by:
Hi,
Newbie question about SqlDataReader column value access...
In java jdbc code to get a value from a table column we can pass the column
name (instead of an int index or offset):
String strLastName = rs.getString( "LastName" );
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|