all groups > dotnet ado.net > may 2005
Filter by week: 1 2 3 4 5
Step into code for application
Posted by Kim at 5/31/2005 11:13:01 PM
I've got an ADO.NET application which I would like to debug by inserting a
breakpoint in a statement of the code. When I pressed F11 to start debugging,
VS.NET always displayed a JScript. I had to step through every statement in
it until the webpage showed up.
Actually, I wanted to see the ... more >>
named parameters
Posted by A.J at 5/31/2005 10:37:30 PM
As I got to know that name parameters are used in sql server and oledb
data provider uses question mark (?) literal. Could you please give me
detailed information regarding these? How they work, when they are used
and why we use them.
... more >>
SQL @@IDentity
Posted by mavrick101 at 5/31/2005 4:01:45 PM
Hi,
I posted a post earlier but for some reasons it didn't show up.
AW, I want to grab the rowid(Primary key) of last row inserted. I tried but
it gives me error regarding cast.The column is int and I tried
datareadter.getint32(0) but it didn't work.
Also can I execute two queries withi... more >>
Executing Mulitiple Queries
Posted by mavrick101 at 5/31/2005 3:45:43 PM
Can I execute two queries with in a single Command.text.
Like in first query I want to insert a row and in second query I want to get
the RowId last inserted.
or do I have to execute two queries?
Thnx... more >>
ASP.NET and @@IDENTITY
Posted by mavrick101 at 5/31/2005 3:38:55 PM
I'm trying to get the id of last row entered. The column is INT, but it
errors out saying 'Specified cast is not valid.'...
command.text = "SELECT @@IDENTITY FROM tablName";
SqlDataReader oRD = command.ExecuteReader();
while (oRD.Read())
{
Response.Write ("<BR> identiti is " + oReader.GetI... more >>
another obj ref error/ need help here
Posted by () at 5/31/2005 10:29:33 AM
im getting the dreaded:
Object reference not set to an instance of an object.
on the code below. pretty new to C# but i know im missing something basic here.
any help is appreciated
thanks
rik
public void GetEEs()
{
SqlConnection myConnection = new SqlConnection("Data Source=(L... more >>
SQLParameter Bug?
Posted by m.moebius NO[at]SPAM gmx.de at 5/31/2005 6:51:18 AM
I have a strange behaviour. Perhaps someone can look through if there
is anything obvious wrong.
The field ProjAdmin is a tinyint
SqlConnection con = CreateConnection(); con.Open();
string sql =" UPDATE tblEmployee " +
" SET ProjAdmin = @param WHERE (EmployerID = 1002)";
SqlCommand cmd... more >>
DataReader
Posted by A.J at 5/31/2005 4:28:14 AM
1. When ever an object of datareader is created ex:-->
dim rdr as oledbdatareader
why we are not using the new operator?
2. Could you please give me detailed overview of datareader
ie.how it works,the different member functions of this class etc.
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Small Projects
Posted by A.J at 5/31/2005 4:15:41 AM
Could you please suggest me some small projects that i can make using
ADO.NET. I want to use msaccess as the database. Currently i want to
work on datareader. Thanks in advance
... more >>
Best way to get started?
Posted by David++ at 5/31/2005 1:37:13 AM
Hi Folks,
I'm a total ADO.NET newb! I've done some Visual C++.NET and some windows
forms programming but have not done any ADO.NET coding yet. I am writing to
ask what is the best way to get started with a simple Windows Forms ADO.NET
project? Is it possible to build a Windows Form project ... more >>
Select Statement
Posted by A.J at 5/31/2005 12:07:14 AM
Application: When a user selects a name in the listbox complete
information(phone-no,E-mail,et=ADc..) regarding the person should be
displayed.
Problem: I have populated the list-box with names using datareader.The
database comprise of id with respect to each name.Now since the id's
are uni... more >>
screen shot of a page in c#
Posted by Saish at 5/31/2005 12:00:00 AM
Dear sir/madam
iam working with an application in c#.
in which we have to handle with webpages with our appication
i have a small problem.
we have to screenshot a particular webpage through code,
ithere any way todo this,
Thank you for helping me
with regards
saish
... more >>
transactions per seconds - how many?
Posted by Rogas69 at 5/31/2005 12:00:00 AM
Hi all,
I would like to ask you, how many transactions per second can you achieve on
your sql servers? I have simple stored procedure that updates records in
small table - and I cannot go over 220 trans per sec using ado .net... Is it
ok?
I am using generated dataadapter (framework 2.0, be... more >>
Stored Procedure
Posted by sam at 5/31/2005 12:00:00 AM
I want to convert standard SQL update syntax into calling stored procedure.
Normal Coding
-------------
Dim constr As String = "server='SQLSVR'; user id='USER';
password='password'; Database='ERP'"
Dim sqlcon As System.Data.SqlClient.sqlconnection = New
System.Data.SqlClient.sqlconnection(... more >>
ODBC connection dataset Dbase
Posted by khchrist at 5/30/2005 11:13:08 PM
Hello
I tried it for 2 days and read a lot of messages, but I can't find it out what's wrong with the following code.
I want to open a dBase file via Microsoft odbc.
The connection goes on without error message, but at the line
daDBF.Fill(dsFBF,"TABLE1")
the programm crashed with the error m... more >>
Optional Parameters values of Stored procedures using Applicationb
Posted by Satish at 5/30/2005 11:06:01 PM
Hi,
We have written small stored procedure for reading data to dataset. Stored
procedure has total three parameters, in one is mandatory and another two has
default values. If we use SQL Command object or SQL Data Adapter we need not
declare the SQL Parameters for the optional parameters in... more >>
Query!!
Posted by A.J at 5/30/2005 10:43:14 PM
1. In a simple query like
str = "select * from emp where empid = '23'"
why in the where clause we always use '@@' these quotes.
... more >>
DB Independence
Posted by Max Bündchen at 5/30/2005 7:21:43 PM
I'm looking for some DB Independence information on web, but I just found
information like persistence-oriented. I would some patter, but not
persistence, for DB Independence using the old and good SQL.
Any tip?
... more >>
<DataRowView> VERSUS <DataRowView.Row>
Posted by [tridy] at 5/30/2005 11:51:58 AM
Does anyone know why while working with drv (DataRowView)
a) if I uses this:
--------------------------------------------------------------------
drv.Row.Item("CODE") = 254
--------------------------------------------------------------------
would always make the row state "Modified"
b... more >>
DataSet constraints
Posted by Glenn Thimmes at 5/30/2005 9:57:56 AM
Hello,
I am having a problem inserting into a dataset that is loaded from a view
that does joins with other tables and includes required fields from those
tables. For example, I might have a view that is an Orders view which does a
join to a Contact table and contains the contact's last nam... more >>
Oracle database connection error
Posted by S. Viswanathan at 5/30/2005 5:48:10 AM
For login screen program username and password are accepted anc check it from
oracle database. The valid username and password entered. but I got the error
"ORA-12154: TNS could not resolve service name". i am using provider for this
connection.
But the same oracle database can be connected... more >>
Yukon Question: FOR XML EXPLICIT Vs. FOR XML PATH
Posted by Sahil Malik [MVP] at 5/30/2005 5:16:51 AM
Okay, this is a really simple question.
This for xml explicit query ---
SELECT 1 as Tag,
NULL as Parent,
G.GrandParentID as [GrandParent!1!GrandParentID],
NULL as [Son!2!SonName]
FROM GrandParent G
WHERE G.GrandParentID IN (Select GrandParentID from Son... more >>
ThreadAbortException from DbDataAdapter.Fill
Posted by Hans Reins at 5/30/2005 12:00:00 AM
Hello,
recently I have encountered with the strange issue concerning
ThreadAbortException that throws DbDataAdapter.Fill (see below the
stacktrace [1]). At the first time I suppose that this problem due to
Command.Timeout property that was set too small, but to tell the truth
it has the m... more >>
bound Datagrid and dataset - update???
Posted by Darryn at 5/30/2005 12:00:00 AM
Hi
I am having a few problems with one of my forms... I have a data grid bound
to a dataset using a currencymanager and it's all working fine. However when
i edit or change any of the data in the Datagrids columns/rows i need to
call update so the changes are saved back to my database, this is... more >>
StreamWriter/StreamReader
Posted by (rbutch NO[at]SPAM coair.com) at 5/29/2005 8:26:25 AM
hey guys, i have a prg that writes a flat text file with specific (spacing) whitespace between the elements.
that works fine.
but i was curious: when i use streamReader to read that back and say put into a listbox, the spacing (formatting) goes away.
does anyone have any insight on how to ke... more >>
Filling a table using multiple adapters
Posted by naisongarvasis NO[at]SPAM gmail.com at 5/28/2005 6:40:10 AM
hi,
I have a dataset with 2 tables(Header and Detail)
I am using 10 adapters to fill the dataset(5 for Header and 5 for
detail).
All the adapters are having same columns(schema) as the tables in the
dataset.
While filling the dataset using the adapters one by one, i am not
getting the expec... more >>
How to access a huge xml document
Posted by ad at 5/28/2005 12:00:00 AM
I always used XmlDocument to load a xml file into memory and to access it.
But if the xml is very huge (Say over 500MB)
How can I access it?
... more >>
How to insert data form Xml into database
Posted by ad at 5/28/2005 12:00:00 AM
I have a xml files, there are many record in it.
Can I insert these record into database at once, or I need to insert it
record by record?
... more >>
SQLDataReader is slow - first time
Posted by ram_kri at 5/27/2005 7:09:00 PM
Hi Folks,
I have a typical situation here.
My application is a sequence of windows jobs (all are coded in C#).
Now one of my jobs when run is supposed to fetch around 100,000 records
from the SQLDataReader, the SP returns 100,000 records. So, this SP call
from C# and then reading the data using... more >>
DataAdaper.Fill question
Posted by Hardy Wang at 5/27/2005 5:25:21 PM
Hi all, with the sample below, if the query returns huge amount of data,
will database returns the portion required by program or returns all data,
then Fill methods filter unnecessary ones?
int currentIndex = 0;
int pageSize = 5;
string orderSQL = "SELECT * FROM Orders ORDER BY OrderID";... more >>
Return always 0
Posted by tshad at 5/27/2005 4:33:07 PM
I am trying to find out why my return from my ASP.Net page is always 0.
I have the following code:
****************************************************
Dim objCmd as New SqlCommand("AddNewResumeCoverTemplate",objConn)
objCmd.CommandType = CommandType.StoredProcedure
objCmd.parameters.ad... more >>
Database backup/restore
Posted by Kimon Ifantidis at 5/27/2005 3:11:03 PM
Is there any way to backup/restore an SQL Server database from .NET, using
the System::Data::SQLClient namespace?
Thanks... more >>
Adding a row to a dataset
Posted by Mike at 5/27/2005 10:42:07 AM
I have a need in my application to add a dummy row to a dataset object after
I have filled it with a call to the database. Trying to find a solution I
thought that doing a dataset merge might work, however its doesn't seem to
be. Following examples I found in some MSDN articles I came up with ... more >>
Redistributing - MSDE
Posted by Bob Costello at 5/27/2005 10:11:12 AM
I want to develop an app that requires database management. I was initially
planning on using an mdb and the Jet driver. However, MSDE offers more robust
features. For some reason I always thought you could develop apps with MSDE
and freely redistribute. However, I recently read that MSDE "is ... more >>
Need advice-VB.NET to C# transition
Posted by (rbutch NO[at]SPAM coair.com) at 5/27/2005 8:32:07 AM
it looks like i'm in a C# world here in houston,Texas and i'm gonna have to make the plunge after doing and really enjoying VB.NET with winforms and web forms for the last couple of years.
yes, even picked up some javascript along the way.
my question is (since there's no classes being held in thi... more >>
CSV read problem using Jet OLEDB
Posted by john.threadgill NO[at]SPAM atlastech.co.nz at 5/26/2005 6:54:54 PM
I am trying to read a CSV file using Jet OLEDB provider.
The file (badimport.csv) looks like this:
Name,Description,DefaultPrice_$_per_m3
S6,Structural sawlog MSG6,65
S8,Structural sawlog MSG8,75
S10,Structural sawlog MSG10,90
S12,Structural sawlog MSG12,120
Using an O... more >>
Timeout on dataAdapter Update method
Posted by larzeb at 5/26/2005 5:16:11 PM
I have run out of ways to determine the reason for a timeout error. The timeout is occuring on the
line indicated with ==>. After completing the statement before, the status of the connection
object(cn) is Open. After the timeout occurs and execution is transferred to the Catch block, the
connect... more >>
Using a cursor SQL server side Problem
Posted by Jon W at 5/26/2005 4:28:25 PM
Hello All
Thank you for any help you can provide!
I have a long list of links with decscriptions titles etc in a SQL Server
2000 database. The basic problem is that I am attempting to use a data base
cursor to to the proper starting point in a sorted view, get the next 10-or
20 records and... more >>
Why does setting the InsertCommand proprty of a Data Adapter fail?
Posted by Mallgur at 5/26/2005 4:18:02 PM
Hi;
I am trying to do a simple operation of inserting a row into a database. I
have set a data adapter to get data from the database to check for
duplication. That works fine.
When I try to use this data adapter to INSERT the data into the database, if
there are no duplicate records, I get... more >>
convert true to 1
Posted by zino at 5/26/2005 10:59:01 AM
in asp.net application I bulk insert records using OPENXML, into table
"myTable".
which has the following field:
column name : myCol
dataType : bit
..... ... ..
myCommand.CommandText = "select myCol from myTable "
adapter.SelectCommand = myCommand
adapter.TableMappings.Add("Table", "m... more >>
Child Relationships
Posted by Jim Heavey at 5/26/2005 10:55:09 AM
If I create a child relationship between 2 tables, but the parent table has a
value which is not found in the child table, then this will cause an
exception....right? So how to I indicate that the parent/child relationship
may or may not exists so that no exception is generated when that occu... more >>
Updating typed dataset schema from code
Posted by jeremym1234 at 5/26/2005 9:58:05 AM
Repost using registered alias:
I have an existing .xsd file with typed dataset information in it. I need the
ability to update this existing schema information when a column is removed
from one of the underlying data adapters.
Currently I read the existing schema info into a temp dataset o... more >>
Error MSDAAB ExecuteDataset
Posted by larzeb at 5/26/2005 9:48:12 AM
I'm confused on calling ExecuteDataset with on a stored procedure with a single parameter. The
following code gets an error stating there is no Stored Procedure with the name of '4' (probably the
value of the CommandType.StoredProcedure enumeration).
Dim parm() = New SqlParameter(0) {}... more >>
DataGrid.DataSource undefined when trying to Sort
Posted by Patrick at 5/26/2005 9:21:03 AM
I had something like the following working:
!!!!!!!!!! !!!!!!!!!! Start of Code snipet!!!!!!!!!! !!!!!!!!!!
<asp:DataGrid id="FormListDataGrid" runat="server"
AutoGenerateColumns="False" ShowHeader="true" HeaderStyle-CssClass="header"
AllowSorting="true" OnSortCommand="SortCurrentMonth_OnClic... more >>
Data Table Joins
Posted by Jim Heavey at 5/26/2005 6:42:02 AM
I have data from two different databases which I want to join together. If
I create one Datatable with the results of one query and another Datatable
with the results of the second query, can I somehow join the 2 Datatables to
produce a result which will look like I had executed a single que... more >>
DataGrid header apperance
Posted by Patrick at 5/26/2005 3:32:03 AM
I have a DataGrid that support sorting in ASP.NET 1.1 as defined at the end
of this post. The issue is that regardless of what "style" attributes I put
in the <asp:DataGrid/> tag or the <asp:HyperLinkColumn /> tags, I don't seem
to be able to change the actual CSS class for the generated <a/>... more >>
ADO.Net 1.1 : SQL Insert ?
Posted by sam at 5/26/2005 12:00:00 AM
How do I convert this ASP 3.0 to VB.Net coding?
ASP 3.0 Coding
-----------------
Set rs = Server.CreateObject("ADODB.Recordset")
rsstatm = "SELECT * FROM F4111"
rs.Open rsstatm, ConnSQL
rs.movefirst
do while not rs.eof
rsAdd = "INSERT INTO F4111A (ILITM,ILLITM,ILAITM) VALUES"
... more >>
Join on two data tables in same dataset
Posted by flagrant99 at 5/25/2005 10:35:15 PM
I have one dataset. Filled one DataTable from dbase. Filled another DataTable
using ReadXml() and Merge(). So now I have to DataTables that I want to Join
on that exist in memory but are from disparate data sources. Can I Join on
them with ADO.NET?
Thanks.
... more >>
Dataset to XL
Posted by Renjith at 5/25/2005 9:18:04 PM
Hi
Is there any way to export to XL thru Dataset , or DataTable or Grid or any
other controls , than manually writing to each cell in XL
Renjith... more >>
Dataview filtering problem
Posted by vallabh naidu via .NET 247 at 5/25/2005 9:02:11 PM
(Type your message here)
--------------------------------
From: vallabh naidu
Hi everyone,
I have a typical problem, I dont weather what i am writing is=
correct or not but I just want to filter the dataview and here=
goes the code but that code below is not filtering according to=
t... more >>
|