all groups > dotnet ado.net > january 2005 > threads for january 22 - 28, 2005
Filter by week: 1 2 3 4 5
Problem with ExecuteNonQuery() Result, Access, ASP.NET, C#, ADO, OleDB
Posted by vanvee NO[at]SPAM comcast.net at 1/28/2005 9:58:00 PM
Hi
I have the block of code below which is supposed to determine the
number of rows affected with an update statement (ASP.Net, Access, C#,
ADO.Net, OleDB) to determine if the update was successful or if a
concurrency error occurred. There is an enumeration defined called
DBResult where 1 is... more >>
How to make an XSLT from one scheme to another?
Posted by Ruslan Popov at 1/28/2005 9:05:16 PM
Hello,
Can you recommend a tool for making XSLT schemas. Let's say I have one XSD
scheme, and I want to make another XSD scheme from the scheme 1, containing
generally the same elements, but groupped in another way, omitting some
fields, adding some others, making attributes from what was elem... more >>
date format in parameter
Posted by Paulb1us NO[at]SPAM newsgroup.nospam at 1/28/2005 2:07:04 PM
I have SQL parameter that looks like this:
cmdUpdate.Parameters.Add
("@invoicedate", SqlDbType.NVarChar, 40).Value = dr["invoice
date"].ToString();
IT is updating a field in a SQL2K database.
The database field is of type char and not date.
The data in dr["invoice date"] looks like th... more >>
SqlDataReader.GetChar(n) failed because of Specified method unsupp
Posted by DHuang at 1/28/2005 1:47:03 PM
Hi there,
I just set up my VStudio 2003 and tried to run a test of reading a character
from database by using SqlDataReader.GetChar, but it failed. I got the
following error message:
-----------------------------------------------------------------------------------------------
An unhandled ... more >>
Table.Rows.Add with expression on columns throwing error
Posted by Joe at 1/28/2005 1:33:09 PM
I'm adding a row to a table. The table has some columns with expressions.
When I add the row I get an error:
Additional information: Cannot perform '-' operation on System.String and
System.String.
Now the catch is I ONLY get this error when I call my server via remoting.
If I call the same s... more >>
Can't add more than one row to table
Posted by dennist685 at 1/28/2005 1:29:05 PM
Can't add more than one row to table
I am attaching a sample application
The schema is based upon Chapter 13 of ADO.NET Core reference.
It uses a currency manager for it's binding context.
Here is the problem. The first form that opens includes a listbox of
authors. There is a button... more >>
Data reader already open?
Posted by Brett at 1/28/2005 12:22:38 PM
I'm using this code in VS .NET 2003
[code]
Me.SqlCmd_BlacklistUpdateStatus.CommandText =
"dbo.[SpamUpdateReport_blacklist]"
Me.SqlCmd_BlacklistUpdateStatus.CommandType =
System.Data.CommandType.StoredProcedure
Me.SqlCmd_BlacklistUpdateStatus.Connection = Me.cn2
Me.SqlCmd_BlacklistUpdate... more >>
OleDbParameter doesn't update value correctly
Posted by HungTrinh at 1/28/2005 11:33:54 AM
Hi,
I use OleDbCommand to insert a new row to Access database. We reuse =
instance of OleDbCommand more than one times.=20
=20
example:
- The value of the first record is QueryID =3D 1 and =
BooleanOperator =3D "And"; Add to database correctly;
- The value of the... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Cant get Stored Procedure connection string right??
Posted by hemant at 1/28/2005 11:15:02 AM
Hi,
SqlCommand cmd = new SqlCommand("my_storedprocedure",con);
cmd.CommandType = CommandType.StoredProcedure;
The error is : type or namespace name 'CommandType' could not be found(are
you missing a using directive or an assembly reference)
I have included the following namespaces
u... more >>
Question on how I can use ForeignKeyConstraint
Posted by Harry Keck at 1/28/2005 10:25:01 AM
I am using ForeignKeyConstraints so that when I change a parent row's key,
the child rows are updated with the appropriate key.
The problem that I am running into is that I would like to be able to add a
row to a table with a value that would not fit a stated constraint. So, I
could add a ... more >>
Confused about MissingSchemaAction.AddWithKey
Posted by Tony at 1/28/2005 9:29:02 AM
Hi!
I am trying to improve the speed of the app. Can you tell me if i need to
use AddWithKey or not? Thanks.
if (base.OpenDB() != System.Data.ConnectionState.Open) { throw new
Exception("Unable to open DB connection!"); }
string sSQL = "SELECT * FROM PROCESSCONTROLVIEW WHERE GROUP_ID = '... more >>
What is the Best way to fetch the most recent updated row in a database
Posted by jagrat NO[at]SPAM gmail.com at 1/28/2005 8:59:50 AM
I am having an OleDBDataAdapter and a dataset. I fill the dataset with
a row and execute
Adapter.update(dataset,"Table Name");
Adapter.fill(dataset,"Table Name");
For the database table, my primary key is an auto number.
Currently, I am fetching the key using:
dataset.Tables["Table Nam... more >>
Dataset created in Code cannot be used in Crystal Reports designer
Posted by Chris at 1/28/2005 4:53:03 AM
Hello,
I've created a Dataset in code on my form based on an OLEDB provider also
created in code. I want to be able to use this dataset in a Crystal Report,
but the dataset is not listed in the report designer? I'm not sure how to
resolve this problem, any ideas are helpfull.
Thank yo... more >>
Continue to develop a old project at a new web path
Posted by cschang at 1/27/2005 10:09:08 PM
I have developed my web module project at my test machine under a
different web path ex. c:\inetput\wwwroot\myProject and tested it.
After it work find there I coped it to my real web site under the
d:\inetput\wwwroot\script\myProject. How can I continue the develop the
project under the n... more >>
# of pooled connections seem too high
Posted by Bob at 1/27/2005 8:02:04 PM
We have a production web site that's data intensive (save user input to DB
and query for displaying) with the ASP.NET app part on one W2K server and
SQL 2000 DB on another W2K server. I have set up performance logs to log #
of pooled database connections on the web server every 60 seconds (.NET ... more >>
infoMessage Truncated
Posted by Lachlan at 1/27/2005 5:47:03 PM
I have a large SP that has various print messages throughout.
I want to view these print messages from .Net. As such I wire up an
infoMessage event handler to the connection.
If executed using executeNonQuery it will return all messages fine. Using
executeScalar, I only ever get the first ... more >>
Domains
Posted by Charles A. Lackman at 1/27/2005 4:26:54 PM
Hello,
I have a made client application that adds records to a database on a
domain. Every now and then the database will create duplicate records. I
have closely checked the code and have not seen anyreason for this to be. I
am using parameters and using ExecuteNonQuery to update the da... more >>
datagrid paging and XML
Posted by Perre Van Wilrijk at 1/27/2005 4:15:57 PM
Hi,
Just curious.
If you use the pagingsystem delivered with ASP.NET datagrid control ...
will the system access the database each time you ask the next page ...
or will all data be loaded into a hidden XML-file which will be used when
going to the next page.
If XML is the answer the... more >>
Concurrency in N tiers
Posted by Rodolfo at 1/27/2005 3:34:16 PM
Hi, I'm creating the arquitecture of a N tiers application, at the moment I
decided to use classes to inherit from Dataset in order to represent the
Data Entities.
However I hit the concurrency problem and I'm not sure how to prevent it
(timestamps, sp, etc.) Can anyone recomend me a good s... more >>
help to nav through DataReader
Posted by Chris at 1/27/2005 2:59:02 PM
I need to move through some records to get the first and last value of a
field. The od days there was movefirst, etc in ADO.
I know .ExecuteScalar() can get me the first record. But if I use a
DataReader how do I get the last record's information for a specific field in
that record?
I've lo... more >>
SELECT Distinct from DataTable, without using SQL
Posted by Duncan M Gunn at 1/27/2005 2:47:50 PM
Hi,
I have the following query I run using SQL:
Select Distinct col1 as D1, col2 as D2, count(col3) as CountOf
from MyTable
group by col1, col2
order by col1
I need to be able to get the same result without using SQL, by querying an
off-line DataSet.
XPath might be able to do the job,... more >>
Cannot generate DataSet from SQL SP in VS 2003 (Biztalk 2004!!)
Posted by Shaun at 1/27/2005 12:11:03 PM
I have VS.NET 2003 and also have BizTalk 2004 installed on the machine.
Usually it is possible to add a DataSet to a project and then drag a stored
procedure to the design surface to create a strongly typed dataset.
With BizTalk 2004 installed the schema designer comes up as that from
BizTal... more >>
Looking for ideas on how to handle a specific data situation.
Posted by pantichd at 1/27/2005 11:21:00 AM
Hello,
I'm looking for options in handling a certain data situation. Data is stored
in Oracle.
There is a database that contains tables with common information. For
example, it contains a table called USER_COMMON. This table has a key field
(USER_KEY) and some other fields containing data (... more >>
preventing new rows in datagrids when using relations
Posted by Albert Price at 1/27/2005 9:05:05 AM
hi,
i am using 2 datagrids tied together with datarelations in a dataset. That
part works great.
i need to suppress the new row on the datagrid but cannot use the readonly
properties on the datagrid so i can allow the user to check off on bool
columns.
I know dataviews can prevent it wit... more >>
How do I filter a child table through its parent?
Posted by Carolina at 1/27/2005 9:03:06 AM
Hi all!
I am trying to apply a filter to a table in a dataset using criteria from a
parent table, but I have no luck so far.
Having a dataset with tables for Customers and Orders, and a relation
between them, I wish to find the highest order for customers in a specific
region. Creating a... more >>
parent, child, grandchild schema
Posted by r at 1/27/2005 8:43:49 AM
I have a database with tables as follows
FILM
* filmID
FilmTitle
FilmLength
FILMKEYWORD
*filmID
*keywordID
KEYWORD
*keywordID
*Keyword
* denotes primary key
Keywords are simply text descriptors for use by a search engine. Films can
have multiple keyword associations.
------... more >>
ASP.NET connection file problem
Posted by asad at 1/26/2005 11:53:03 PM
Hello friends,
I have some problem in my ASP.NET connection
'Connection file code
<%
dim connstr
connstr=("Provider=Microsoft.Jet.OLEDB.4.0;data
source="&server.mappath("database/it.mdb")&"")
%>
follwoing error message occur when i execute the page
Compiler Error Message: BC30451: Name '... more >>
SQLHeper ExecuteNonQuery - returning values
Posted by Paul Aspinall at 1/26/2005 11:02:20 PM
Hi
I have a Stored Proc in SQL server, which creates a record key when a record
is created.
I want to return the value back to my code, once the record has been
created.
I am using SQLHelper (Data Application Blocks for SQLServer), and calling
the ExecuteNonQuery method in the SQLHelper... more >>
Execute Query on a TOTALLY disconnected DataSet
Posted by rawCoder at 1/26/2005 9:17:19 PM
Hi All
Is there a way to Execute a query (possibly including two tables and joins)
on a totally disconnected dataset.
By 'Totally Disconnted' , I mean there is no DB and there is no DBConnection
/ DBCommand - all the data and structure is in memory.
The query is to be used to databind a grid,... more >>
Executing SP while data read is open?
Posted by Brett at 1/26/2005 8:47:35 PM
I execute an SQL stored procedure that returns 5 records
("SqlCmd_SpamUpdate_spfBlackUnprocessed"). I then open a data reader, loop
through those five records while calling stored procedures that does
updates. The second SP needs information from the 5 records being returned.
The problem i... more >>
Connection Object
Posted by Charles A. Lackman at 1/26/2005 6:34:09 PM
Hello,
Is there a way to connect to outlook's address book with ADO.net and fill a
dataset with it?
Any suggestions will be greatly appreciated.
Thanks,
Chuck
... more >>
Implementin Three-Tier App.
Posted by Anibal at 1/26/2005 6:28:19 PM
Hi,
I'm learning about three-tier programing and i want to implement this in a
simple windows forms Application (not web), i'm using an Access 2000 Data
Base, the objective of my application is to stores data from cd's into the
data base, so i have 4 related tables, ("CdCategories",
"Cds","... more >>
Oracle Datareader - Datatype
Posted by SDF at 1/26/2005 5:37:33 PM
I have a table in 9.2 and a field as INT. When I use an OracleDataReader to
query the table the field is being returned as Decimal. Being not to
familiar with Oracle does anyone have an idea why?
CREATE TABLE DWSDLAYERS (
LAYERID NUMBER,
LAYERNAME VARCHAR2 (128),
LA... more >>
problem of using ACCESS
Posted by Shao Yong at 1/26/2005 5:05:29 PM
I've written an asp.net application using ACCESS as the database. It
works well first. But after a while, I found the application cound not
make response to user's request quickly. It seems dead. You couldn't the
ASP.NET page.
Why? And how to solve the problem. Someone please help me.
Here ... more >>
How to check for query field length
Posted by Kurt Schroeder at 1/26/2005 4:43:03 PM
I have the follow asignment: txtDescription.Text = dtrSlb("slbDesc2")
If the field returned is Null i get a run time error.
I can check for if (dtrSlb("slbDesc1").GetType.ToString() = "System.DBNull")
then .... But there has to be a better way.
Aslo what's the best way t oget the length... more >>
ARITHABORT....
Posted by Ollie Riches at 1/26/2005 4:25:06 PM
I have a stored procedure that is being called from ado.net and it is
failing with an exception that is related to the option ARITHABORT - 'UPDATE
failed because the following SET options have incorrect settings:
'ARITHABORT'.
This stored procedure works perfectly fine from query analyzer and ... more >>
Async Calls to DB does not help in the efficiency department?
Posted by roberto3214 NO[at]SPAM netscape.net at 1/26/2005 3:49:45 PM
Hi Guys,
I was recently reading an article:
http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/dnservic=
e/html/service10012002.asp
[Excerpt]
"One of the most common types of I/O operations that occur within a Web
method is a call to a SQL database. Unfortunately, Microsoft... more >>
get record count from stored procedure without passing DATA back?
Posted by John B at 1/26/2005 3:00:30 PM
Is it possible in ADO to execute a (select) stored procedure, but just
return the number of records, not the actual data.
My client has some stored procedures which if executed with certain
parameters can return thousands of rows. I would like to execute a check
prior to returning these rows a... more >>
string name = dataSet.GROUP.FindByID_GROUP(id_group).GROUP_NAME invokes NullReferenceException
Posted by £ukasz Margielewski at 1/26/2005 2:08:04 PM
I vant to receive group name by automaticalyy generated function
FindByID_GROUP in VS C#. I know, that mentioned function returns string type
value. What is wrong with this line? Why this exception occures, altrought I
know that argument id_gropu is properly, and I am sure that the value in
... more >>
need to know the primary key of a table
Posted by toufik at 1/26/2005 2:07:46 PM
Hi,
in order to know the primary key of a table in my dataset, i've the folowing
code
sql "select * from table1"
create a dataadapter with this sql DA
fill the dataadapter in a dataset DS
DS.Tables(0).PrimaryKey
but the expression returns me an empty array, is there any problem? is ther... more >>
Common SQL connection help
Posted by fsu_mike at 1/26/2005 1:19:05 PM
Can someone share with me code for the following task please?
1) User clicks a button(button1), to bring up a file location window for the
user to select the SQL Server 2000 and Pub database on the network(not
onhis/her current machine so the user needs to create the correct path).
2)That user... more >>
Data Controls or Code
Posted by Steve Murphy at 1/26/2005 11:37:59 AM
I'm fairly new to .NET, so bear with me if this question is naive. But do
most developers use the VS data controls for connections, adapters, and
datasets, or do you write all that code manually?
And if you use the controls, how do you wrap your connection and adapter
code so that you can easi... more >>
db file lock problem, permissions help
Posted by Kurt Schroeder at 1/26/2005 7:55:43 AM
I'm having a problem with my test server where I get the following message
when i run a simple test app created in VisualStudio.net:
The Microsoft Jet database engine cannot open the file
'E:\WebSites\DamarStone\db\damarstone.mdb'. It is already opened exclusively
by another user, or you need... more >>
Null Exception on OleDbDataAdapter.Fill
Posted by Chris at 1/26/2005 5:51:08 AM
I am getting Null Exception error when I try to fill a dataset. I am
providing a value for my parameter so I'm not sure, what's going on. Please
see below.....
Thanks
Dim cmd1 As OleDbCommand = New OleDbCommand
cmd1.Parameters.Add("@adate", OleDbType.DBDate)
cmd1.Conn... more >>
update a DataSet object with a GridView
Posted by dave at 1/26/2005 4:51:03 AM
hi,
it seems, that a lot of people have the problem (including me), that isn't
possible, to update a dataSet object with a gridview (without a data objet).
does anybody knows something about this problem??? thanks.
... more >>
Three-Tier Application Examples.
Posted by Anibal at 1/26/2005 3:12:00 AM
Where can i find simple Three-Tier Application Examples?
Thank you.
... more >>
How to update dataset with multiple tables in C#?
Posted by bradontaiwan NO[at]SPAM hotmail-dot-com.no-spam.invalid at 1/25/2005 9:53:57 PM
I create 2 tables, ParentTable and ChildTable. The row in ChildTable
is referenced to ParentTable. But after updated and saved to
database, the row in ChildTable doesn't refer to the correct row in
ParentTable. You can see the following example to get the problems.
Is there any good way to updat... more >>
Lock tables during SELECT
Posted by Pickles The Cat at 1/25/2005 8:12:14 PM
I am doing a transfer operation from one database to another.
During that time, I want to lock some tables so no new data can be written.
How can I do this ?
--
incognito...updated almost daily
http://kentpsychedelic.blogspot.com
Texeme Textcasting Technology
http://texeme.com
... more >>
NullReferenceException in call to DataTable Select
Posted by headware at 1/25/2005 5:06:36 PM
I'm trying to use the Select() method on a DataTable but I'm getting a
NullReferenceException. Here's the stack trace:
at System.Data.Select.Evaluate(Int32 record)
at System.Data.Select.FindFirstMatchingRecord()
at System.Data.Select.GetBinaryFilteredRecords()
at System.Data.Select.SelectRows... more >>
Like keyword
Posted by Patrick at 1/25/2005 5:03:54 PM
Hi Group
I have one column which can be either Null or with some value.
I have one filter criteria in From End with
"All", 'RTF Yes' and 'RTF No'.
Depending on the filter selected by user i have to select the pertaining
rows as below
If Filter "All" select all rows from table
if Filter =... more >>
Optimizing multiple rows storing into Access 2003. Need Help!
Posted by yachea2002 NO[at]SPAM hotmail.com at 1/25/2005 3:17:44 PM
Hi I am looking for a way to optimize my data storing into an Access
2003 Table (the mdb file I am using is Access 2000 version)
oleDbDataAdapter seem to write one row at time even if it receives
multiple rows
I tried this code below
CalBackFunc() <- My call back func is called every sec... more >>
TableMappings
Posted by Fei at 1/25/2005 1:38:57 PM
Hi,
I got a problem by putting 3 SELECT statements in one DataAdatper. I try
to build a 'Select' DataAdatper, which only has select command. I put
following lines in select commandtext
Select * from Orders;
Select * from OrderProducts;
Select * from Products;
I use Data... more >>
SQL Server Error Trapping in ASP/ASP.NET
Posted by Havagan at 1/25/2005 12:51:06 PM
I've run into an odd bit of behavior when dealing with SQL Server 2000 and
ASP/ASP.NET that I wanted to discuss.
The issue I encounter is that in a stored procedure, once a SELECT statement
succeeds and returns a recordset, all resulting errors are ignored by
ASP/ASP.NET in certain cases (s... more >>
vb.net version 1.1 Can't connect to SQL server2000 on a server.
Posted by fsu_mike at 1/25/2005 11:51:04 AM
Can someone tell me why I can't use the data adapter to SQL server 2000 on my
server using vb.net 1.1? When I try from my workstation, I get a good test
connection message, but then VB will tell me the following message "Unable to
connect to database. It is only possible to connect to SQL Se... more >>
Cannot Create a Dataset for an OLEDB DataAdapter
Posted by Chris at 1/25/2005 11:17:04 AM
Hello,
I have an OLEDB DataAdapter and cannot create a Dataset to use with the
adapter because the SelectCommand contains a parameter. Is there a work
around for this?
Any Help is appreciated.
Thank You... more >>
Error while using Scope_Identity() instead of @@identity. WHY?
Posted by nashak NO[at]SPAM hotmail.com at 1/25/2005 11:13:48 AM
Hello everyone,
I am trying to get back the primary key and was using @@identity
without any problem. However, when I use scope_identity() I get the
following error.
"Cast from type 'DBNull' to type 'Integer' is not valid."
Please help.
Thanks
... more >>
Error joining tables from separate db's using SqlCommand object
Posted by Corbin at 1/25/2005 11:04:16 AM
I'm trying to run a query that joins tables from 2 databases on the
same server. The query is like this:
SELECT TitleID, u.Name as Assignee
FROM tblTitle t
LEFT JOIN titlepost..Portal_Users u
ON t.TitleProcessor = u.email
When I put it in a stored procedure and execute the sp using SqlCom... more >>
Constructing a Dataset from XML
Posted by Michael Kellogg at 1/25/2005 9:49:29 AM
I have an XML file I've created in another application that contains
information on files, forms, and job header. My plan is, in my new
"consumer" app, to read in this data and work with it, ultimately
producing labels for shipping, etc.
My planned approach is to construct a Dataset with 3... more >>
ASP.NET Connection String
Posted by m00nm0nkey at 1/25/2005 9:27:05 AM
Hello, I have successfully been using the following connection string to
connect via a SQLConnection object in my ASP.Net application for many weeks:
Data Source=MARS-TEST;Initial Catalog=CascadeWMCClient;UID=marsweb;PWD=marsweb
Today, after our Network Support Technician added a hard drive ... more >>
copy datatables between datasets..
Posted by venkat at 1/25/2005 9:21:01 AM
How do I copy a table from one dataset to another ?
code I am using and that is not working :
dataset2.tables.add(dataset1.tables(tablename))
Please help me.
prashant... more >>
Multi DB. And now?
Posted by Max André Bündchen at 1/25/2005 8:54:22 AM
Hi all,
That is a really bad, bad question, but some of us have problem with a
application with more than one DB. Anyone here dev. the same app. for more
than one DB? Why the best solution in the ADO.NET for that, thinking in time
and cost, of course.
In my case, for example, I have a ap... more >>
Removing row pointed to by bound combo
Posted by Paul Aspinall at 1/25/2005 8:42:30 AM
Hi
I have a combo which is bound to a datatable.
I want to remove the record from the datatable, which the combo points to.
Can anyone confirm the correct syntax....
I believe it will be something like
datatable.Rows.Remove(.......??how do I find the row that is bound to the
combo??);
... more >>
Use data designers in non-visual component
Posted by Bomza at 1/25/2005 8:38:54 AM
Is there any way of using the ADO data wizards in a non-visual
component? If you create a "web service" project, you drag ADO
components onto a designer and use wizards, but I can't work out how to
do this with a standard class library.
Cheers.
... more >>
Create a parameter for the oledb data adapter
Posted by Chris at 1/25/2005 6:55:06 AM
Hello,
Is it possible when configuring an OLEDB DataAdapter, using the Query
Builder, to specify parameters?
I've tried placing =@parametername in the criteria section of the Query
Builder, but this seems to always gerenate errors and then the Datasets won't
fill.
The datasource is a ... more >>
Copying a table in ADO.net and the pesky identity column
Posted by Rippo at 1/25/2005 4:20:00 AM
I am finding problems in trying to copy a databse table from one SQL
2000 server to another using ADO.net. However the source table has an
identity column and I need to preserve the values in the destination
table. Obviously every time I run the below code the destination table
does not have the... more >>
ORA-01461 while moving data from sqlserver to oracle
Posted by Jan van Veldhuizen at 1/24/2005 11:42:42 PM
I worte a conversion program which moves all data from SqlSrv to Oracle,
using the OracleClient and SqlClient classes of .Net.
Now when a column has 2001 characters or more I get this error. I've read a
lot of it, but I do not fully understand what is wrong, and more important,
how it can be s... more >>
MyGeneration for .NET (100% Free Code Generator / OR Mapper)
Posted by MyGeneration at 1/24/2005 10:17:03 PM
MyGeneration is 100% free, tired of hand coding business objects, stored
procedures, spend your time wisely doing other thing and let us help you.
See http://www.mygenerationsoftware.com
1) MyGeneration is a Template Based Code Generator Supporting Four Template
Languages - JScript, VBScrip... more >>
Correct syntax for pasing a SELECtT statement in a string
Posted by Gordon at 1/24/2005 8:23:06 PM
What is the correct syntax for passing a select statement via the Reader.
The following code doesn't return anything.
Dim strSQL2 As String = "SELECT * from ATable WHERE ' " &
ComboBox1.Text & " ' = ' " & TextBox1.Text & " '"
Dim cmd As New OleDbCommand(strSQL2, Conn)
... more >>
Synchronize Question
Posted by slonocode at 1/24/2005 8:13:01 PM
I have a situation where I have read only access to an Access database.
I need to query the database and insert the rows retrieved into my own
database. However there is no gaurantee that the original query won't
return rows that I've already inserted into my own database.
So my question... more >>
Execute File SQL in AdoNET VB
Posted by John Fred at 1/24/2005 7:09:44 PM
Hello,
I have a file .SQL Containing a Script to Create Tables and Stored
Procedure...
Example :
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[SP_ADVANCED_SEARCH]') and OBJECTPROPERTY(id,
N'IsProcedure') = 1)
drop procedure [dbo].[SP_ADVANCED_SEARCH]
GO
......... more >>
Error: "System.Data.OleDb.OleDbException: No value given for one or more required parameters"
Posted by Brian Foree at 1/24/2005 6:32:29 PM
I am developing an ASP.NET application that uses Access 2000 as its backend,
and have just started getting the following error on 2 ASP.NET pages that
had been working until late last week (and I don't think I made any changes
to either page other than changing the user control that creates the
... more >>
Good Practice on ListBox
Posted by Hemang Shah at 1/24/2005 5:31:58 PM
Greetings
I want to display a listbox on the form which will include two columns from
the data table" FirstName" & "LastName"
What I've done now, is modify the DataAdapter to include two additional
colums as:
[FirstName] + " " +[LastName] As NameFN
[LastName] + " " +[FirstName] AS Name... more >>
OracleDataAdapter filling Dataset with duplicate rows
Posted by MS at 1/24/2005 4:43:03 PM
Hi,
I am using OracleDataAdapter to fill my DataSet. I am using Select Distinct
in my sql querry to get unique recored.
I am getting duplicate rows in DataSet.
My SqlPlus shows only one row of Data. When I execute the code to fill DataSet
My DataSet.tables[0]. rows.count gives me c... more >>
How to save/update DataTable when its structure is unknown?
Posted by Uri at 1/24/2005 2:15:05 PM
Hi all,
I would like to have a functionality that saves/updates a given DataTable
into the DB while its structure is unknown.
I think of 2 possible solutions:
1) to use SqlCommandBuilder - which is very expensive in the runtime
(performance issues)
2) constructing my own commands - iterating... more >>
sending mail through stored procedure
Posted by Patrick at 1/24/2005 1:12:19 PM
Hi
Can anyone tell me how can I send email through stored procedure in sql
server ? I want to send attachment with this email too.
TIA
... more >>
Databinding in c# - Important
Posted by Hemang Shah at 1/24/2005 12:50:58 PM
Hello
All the samples I found are based on datagrid for the child table.
What if I don't want the child records to be displayed in a datagrid, but in
their own data bound controls like "text box, combo & list boxes). And I
want to provide a second level of navigation buttons to traverse tho... more >>
SQLDataReader and Columns
Posted by Roger Webb at 1/24/2005 12:33:22 PM
How would I get the length of a column from a SQLDataReader? I'm looking
for something like Query Analyzer uses to display its data. So, I would
need to know that a varchar(200) is 200 where a varchar(20) is only 20.
Also I need to know how many characters a datetime would fill up. This
kinda... more >>
ADO.NET Oracle Varchar2 BUG?
Posted by plumeprog at 1/24/2005 11:19:07 AM
Hi,
I have an Oracle 8.1.7 server and I'm extracting a Varchar2(length 300)
using an aspx page and the field is always Null, even if it's not in the DB.
I tried the EXACT same code in a windows form and it works perfect.
Is there a bug in asp.net/ado.net with Varchar2 bigger than 256 char ?... more >>
Passing OracleDateTime.null.value to store procedure???
Posted by Kevin Yu at 1/24/2005 11:07:22 AM
using Data access application block for oracle, I try to pass a null value
to the OracleDateTime to the store procedure. but I got an exception saying
"this value si null", what am I missing here? shouldn't I be able to pass
null parameters?
Kevin
... more >>
edit memory DataTable
Posted by Petez at 1/24/2005 6:57:05 AM
Hi,
I created simple dataTable (one field numeric, one string). Then I prepared
dataConnector and put DataGridView on the form. In datagrid I can edit now
numeric field but string field after post is clear (NULL value). Can anyone
help?
Thanks
... more >>
edit string field in DataGridView
Posted by Petez at 1/24/2005 6:55:06 AM
Hi,
I created simple DataTable (memory table) object with two fields
-numeric Id
-string Name
then I configure dataConnection and put on the form DataGridView.
I bind fields from table to columns and now I can edit numeric column
but when I try edit string column then it is after post event... more >>
Lock Table
Posted by Geoff Murley at 1/24/2005 3:12:53 AM
In a SQL Server 2000 Database I have a Table which is
shared by many users. I have a VB.NET Procedure which
contains many calls to Stored Procedures and ADO.Net
Commands to clear and update this shared table. What I
would like to do at the start of this lengthly procedure
is to place an ... more >>
Cant connect to SQL Server 2000 Developer edition
Posted by hemant at 1/23/2005 7:53:02 PM
Hi,
I have been trying to connect SQL Server2000 developer edition using the
following string.
SqlConnection conn = new
SqlConnection("server=localhost;database=pubs;uid=sa;pwd=");
I dont know where i am going wrong.
SQL Server Service Manager shows the following:
Server : Hemant... more >>
duplicate ids after insert
Posted by toufik at 1/23/2005 7:19:52 PM
Hi,
I'm trying to create an archiving script, using the folowing query for all
database tables
insert into table2 select * from table1 (table1, table2 are 2 tables having
exactly the same definition)
The rpoblem is that the rows are,'t deleted from the table TABLE2, so the
next time the u... more >>
Timberline (Pervasive) ODBC Access
Posted by Robert Porter at 1/23/2005 4:18:27 PM
Is anyone else out here working with Timberline version 7.x,8.x or 9.x and ODBC and .NET? If so any advice to offer? I am working with a number of older VB 6 applications that interface (mostly just read) Timberline data stored in a Pervasive SQL database that I am porting to VB.NET.
Experiment... more >>
convert 2 XML files into a dataset
Posted by RC at 1/23/2005 11:16:58 AM
Hi,
I now have 2 xml files with same structure
first.xml
<dataset1>
<table1>
<col1>aaa</col1>
<col2>bbb</col2>
</table>
.....
</dataset1>
2nd.xml
<dataset1>
<table1>
<col1>ccc</col1>
<col2>ddd</col2>
</table>
.....
</data... more >>
.Net master-detail interface
Posted by r at 1/23/2005 11:16:11 AM
I can build an interface for a master-detail database in about 5 minutes
with vb6 using the data environment 1.0 reference.
Does .Net have anything similar or must I define a connection, datadapters
and the relational schema by hand?
... more >>
CharIndex SQL
Posted by pierre hourdille via .NET 247 at 1/23/2005 9:38:44 AM
Hi alls
I have a problem with a stored procedure :
I use a CHARINDEX to filter a query and if I execute the query from sqlServer the charindex works fine but if I execute the query from my ASPNET application the charindex always return 0 (to test it I quit it from the Where to put it as a colu... more >>
Sharing an OLE DB connection between MDI Parent and Children
Posted by Peter Hawkins via .NET 247 at 1/23/2005 9:38:30 AM
G'day all,
Being a fairly inexperienced programmer, I've never worked with=
MDI Forms before=2E What I'm trying to do is open a Jet OLE DB=
connection on my MDI Parent form (which is used to log in and=
out with user name and password), and access this same=
connection from the MDI Child ... more >>
C# SQL SERVER LAST INSERT ID EXAMPLES
Posted by Sheraz Khan via .NET 247 at 1/23/2005 9:36:50 AM
does anyone have sample code of data being inserted to a table, then the last insert id is retrived and inserted into another table.
The Code is c# and the database is SQL SERVER, NO Access examples or vb...
Thanks for this... i just cant find a simple example on this identity problem, people... more >>
insert multiple rows using loop
Posted by vrush desh via .NET 247 at 1/23/2005 9:34:48 AM
(Type your message here)
Hi,
I am trying to insert multiple rows using 'for' loop.
It inserts first row but while inserting second row it gives error like
"The variable name @name already declared. Variable names must be unique within a query batch or
stored procedure"
Please help me...my em... more >>
ExecuteReader requires an open and available Connection. The connection's current state is Closed.
Posted by renu renu via .NET 247 at 1/23/2005 9:30:18 AM
(Type your message here)
--------------------------------
From: renu
Friends,
when I am trying to create a login page and connecting to the sqlserver database I am getting the following error
ExecuteReader requires an open and available Connection. The connection's current state is ... more >>
Fire query on DataSet
Posted by Arun Gupta via .NET 247 at 1/23/2005 9:27:33 AM
DataSet is supposed to be an in-memory database=2E So is it=
possible to fire a query on it=2E I want to fire a "Select" query=
(with alises in it) and also a "Transform" (Crosstab) query=2E In=
the current scenario I am putting things in an Access table but=
for performance reasons want to ... more >>
Can't get record to insert into Access
Posted by Drew Burlingame via .NET 247 at 1/23/2005 9:27:19 AM
I have a windows service that will insert records into an Access=
database=2E Or at least that's the idea=2E The insert isn't=
happening, but the code runs without raising any errors=2E When I=
run the generated sql statement from a query window in Access,=
the record inserts just fine=2E... more >>
.Net Data Provider error help
Posted by Ted at 1/23/2005 8:34:19 AM
I've used the Microsoft .Net Data Provider for Oracle and also the Oracle
..Net Data Provider . I'm issuing a simple select statement which would
return a list of dates formatted as such 'MM/DD/YYYY'. The table is storing
the dates in a field of date data type in the format of M/D/YYYY. There is... more >>
Help! Operation is not allowed in this context.
Posted by leeronald1982 NO[at]SPAM yahoo-dot-com.no-spam.invalid at 1/22/2005 9:54:23 PM
Hi, I got an error message - Operation is not allowed in this context.
It said the error comes from the line objRS.Close()
Anyone have any ideas why? Thanks a lot.
Here is part of the code:
Dim strConnectionString As String =
"PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=c:\test.mdb"
objCo... more >>
newbee needs help with code
Posted by Danny Ni at 1/22/2005 8:34:57 PM
Hi,
I have the following VB.Net code snippet:
While datareader3.Read
..........
strsql = "select * from InspectionViolations where propTableID=" &
datareader3.Item(4) & " AND inspIDCleared IS NULL"
ConnViolPresent.Open()
CmdViolPresent = New SqlCommand(strsql, ConnViolPresent)
... more >>
Retrieving @@IDENTITY value from Access Database give always 0 !!!!
Posted by £ukasz Margielewski at 1/22/2005 3:51:47 PM
I need to retrieve automunber ID from source access table after inserting
new row...
I tried to do this by this way:
gRUPATableAdapter.Update(dataSetGrafik.GRUPA);
oleDbConnectionForID.Open();
OleDbConnection oleDbConnectionForID = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Da... more >>
SqlDataAdapter memory leak?
Posted by Matt Weber at 1/22/2005 10:48:31 AM
I've been trying to track down a memory leak in a project and have been
running around in circles for the past week or so. I've been using this
as an opportunity to evaluate Compuware's devPartner, but unfortunately
it seems to be doing more to confuse me than to help me. My problem can
be ill... more >>
Questions on Databinding
Posted by Hemang Shah at 1/22/2005 9:56:04 AM
Hello
I've few questions regarding ADO & C#:
1) Is it possible to view tata from multiple tables in the Datagrid control
? Most of the examples I see are only for 1 table.
2) In Comboboxes, can we display multiple fields ? For example in a Form of
customers, we have a combo box to sel... more >>
Mapping single table to many tables
Posted by md02439 NO[at]SPAM hotmail.com at 1/22/2005 3:29:50 AM
Hallo people,
is it possible to map the columns return by a sql select command to a
DataAdapter to different tables in ADO.NET? I tried the tablemappings
collection but got the following error message:
"The DataTableMapping.SourceTable is required to be unique, 'Table'
already exists in the c... more >>
|