all groups > dotnet ado.net > march 2008 > threads for march 22 - 28, 2008
Filter by week: 1 2 3 4 5
Data is different than in database
Posted by fniles at 3/28/2008 11:28:54 AM
I am using MS Access and VB .NET 2005 (the same problem happens in VB.NET
2008).
I am reading from a query using DataReader (the same problem happens if I
use OLEDBDataAdapter).
When I run the query in Access, the value for Cash = 830.004999999999, SC =
1692.5 and Profit = -862.495000000001.... more >>
Loading a generic collection from a SqlReader?
Posted by Dave at 3/27/2008 1:35:01 PM
Hi, is there any underlying difference between loading a generic collection
from a reader using the two methods:
List<User> colUsers = new List<Users>();
while (reader.Read())
{
User user = new User();
user.FirstName = (string)r... more >>
LINQ-to-SQL transaction problem in calculated property
Posted by Jakob Lithner at 3/27/2008 8:08:00 AM
I have a DBML object that maps database to objects.
In the partial Text class I added a couple of calculated properties.
Several of them are dependant on how many child object are related to the
current object. To avoid duplicate database calls I got the idea to set local
variable _childrenC... more >>
The user instance login flag is not supported on this version of S
Posted by Morris Neuman at 3/26/2008 7:59:01 PM
I copied a C# project from one machine to another both XP Pro with VS2005.
Then solution compiles but when I run the app I get the error message on the
first dataadapter.FILL() command:
"The user instance login flag is not supported on this version of SQL
Server. "
SQLExpress and SQ 200... more >>
Get return code from SQL Server Sproc?
Posted by Smokey Grindel at 3/26/2008 2:02:57 PM
Say I have a procedure that returns a return code like the following...
CREATE PROCEDURE TestProc
AS
BEGIN
SET NOCOUNT ON;
SELECT *
FROM MyTable;
RETURN 10
END
And I execute that in a sql command object, how does my client application
get the return c... more >>
Help with multiple connector/table query
Posted by Alan Morris at 3/26/2008 10:11:26 AM
As a newbie to ADO.NET I am struggling with the following:
I have an ODBC data table that I want to use a source for updates to a
SQL server table, I envisage the sql query having the following
structure:-
INSERT INTO SQL_TABLE FROM SELECT ODBC_TABLE WHERE ODBC_TABLE.KEY NOT
IN (SELECT SQL_... more >>
Obtaining a List of Databases
Posted by Robert E. Flaherty at 3/26/2008 8:00:13 AM
I can use the SqlDataSourceEnumerator to get a list of SQL Server instances.
How do I obtain a list of databases in a given SQL Server instance?... more >>
OracleClient, Oracle 10g, Connection failure
Posted by davebythesea at 3/26/2008 2:55:00 AM
Hi,
I'm trying to connect to an Oracle database via a .NET web service running
in IIS on a Windows 2000 server.
I am using the OracleClient (System.Data.OracleClient) provider . When I
call connection.Open() I get the following error -
'System.Data.OracleClient requires Oracle client ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Handling concurrency violations
Posted by John at 3/26/2008 2:00:41 AM
Hi
I have developed the following logic to handle db concurrency violations. I
just wonder if someone can tell me if it is correct or if I need a
different approach.Would love to know how pros handle it.
Thanks
Regards
Dim dc As DataColumn
Dim drCache As DataRow
... more >>
Connection Open Error
Posted by Pattnayaks@gmail.com at 3/25/2008 8:10:20 PM
Hi,
Below is the piece of code i am using for my connection object &
database transaction.
private SqlConnection _mConnection;
private SqlCommand _mCommand;
private SqlTransaction _mTransaction;
public SqlDataAdapter CreateDataAdaptor(string comText,
Command... more >>
Getbytes usage from VS 2003 to VS2005
Posted by Jeff at 3/25/2008 1:31:01 PM
When accessing a BLOB from a DB using getbytes, 0 bytes are returned. The
same thing worked with VS2003. The recent environmental change was from
VS2003 to VS2005 and also from .NET 1.1 to .NET 2.0.
/* Here is the function that reads the blob from the db */
private bool GetImageSeq(ref b... more >>
Update query that won't take DBNull
Posted by michael at 3/25/2008 1:21:03 PM
I have a stored procedure that I let the wizard create a function in the
QueriesTableAdapter class. Some of the parameters to the stored procedure
clearly allow for nulls (AllowDBNull) but somehow the wizard refused to add
the Global.System.Nullable(Of String) to the generated function's param... more >>
Databinding en un Combobox
Posted by jmrsuarez@gmail.com at 3/25/2008 10:10:22 AM
Hi, i am using a list named ListaCombo to populate a combo box with a
query, but when i execute the code,
comboBox1.DisplayMember = "Display"; it thows a "The
connection is already Open (state=Open)" error messages.
anyone can give me idea?
thanks
//TextDate.Text = "H... more >>
Guarantee read lock in transaction?
Posted by Jakob Lithner at 3/25/2008 8:23:02 AM
I have a SQL table where the PrimaryKey column ID is a long. There is a
ForeignKey relation from column ParentID back to the same table to track
relation. Default for new records is always to relate back to itself.
I don't really care what value is used for ID on new records, but as I need
... more >>
Compacting and repairing access 2000 db
Posted by John at 3/25/2008 1:17:02 AM
Hi
Is it possible to compact and repair an external access 200 database via
code?
Thanks
Regards
... more >>
LINQ with switch statement
Posted by Ant at 3/24/2008 5:59:01 PM
Hi,
I'm trying to use a swithc statement in a LINQ query but its not ahppy at all.
Any ideas as to the correct way to go about this?
Many thanks for any ideas
Ant
Below is the statement:
var resultSet = from p in db.Projects
where p.ProjectCode == textboxProjectC... more >>
drop column via ODBC with "active relation"
Posted by Olaf Krause at 3/24/2008 5:10:11 PM
Hi,
Situation:
* Access to a MS Access DB via ODBC
* Two columns of two tables a related (checked with MS Access GUI)
* I want to delete (drop) one colum of one table (which is not a key column)
but related to the other table
code:
commandstr="ALTER TABLE "+Name+" DROP COLUMN "+sche... more >>
dbml metadata
Posted by Chuck P at 3/24/2008 9:40:07 AM
Is their a way to get the dbml metadata at runtime.
For example I would like to see the datatype and length for the LastName
field.
... more >>
Query Parameter prefix in Oledb
Posted by peter.taslimi@hotmail.com at 3/24/2008 7:31:52 AM
I am trying to create a parametrized query based on City on the customers
table in Northwind.mdb. The sql version on Northwnd.mdf works fine using
@City in the query, but when I try to create it for the access dataset, it
puts single quotes around the '@City'. Is there another character one ha... more >>
Using sender object in event handler
Posted by Ant at 3/24/2008 1:28:01 AM
Hi,
I'm tring to use the event handler in the statement completed event of a
command object to retrieve the value of the output parameter passed from the
SP.
When I try to do this, I get an 'Object referece not set to an instance of
an object'
What is going wrong here? Isn't sender the ... more >>
Organize Data in a DataSet
Posted by Lore Leunoeg at 3/23/2008 6:46:31 PM
Hello
I'm busy with a client application which is working on client-data. Client
data are spread over several 1:n tables in the database. How should I
organize data in the dataset(s) ?
1) Create one dataset for each client with the tables which select only the
data specific to this clien... more >>
Need some advice
Posted by Mark Moeykens at 3/22/2008 5:35:00 PM
I'm building a WPF app for single users. They enter data, saves to xml file.
They can share this xml document with others who have the same app.
I wanted to keep it simple so basically when they open the xml file I do a:
DataSet.ReadXml("filePathToXml");
When they save their work I do a:
Dat... more >>
Strongly Typed DataSet and 10,000+ records as a LookUp
Posted by stuppi at 3/22/2008 8:21:01 AM
We are using a typed DataSet containing one table with an adapter. 10,000
records in the table is a fair estimate used to point out our concerns
regarding the resources consumed by using the DataSet as the DataSource of a
ComboBox. Please put aside the fact that a 10,000 record LookUp may be... more >>
|