all groups > dotnet ado.net > april 2008
Filter by week: 1 2 3 4 5
DataGridView
Posted by Bails at 4/24/2008 9:03:18 PM
Hi All, I have been searching everywhere but I am totally stumped. Can
anyone PLEASE help.
I am using VB.Net 2005 edition and have a DataGridView (DGV)on my form.
The DGV is NOT bound to anything as I want the user to input their values.
Once they have finished I THEN want to save the valu... more >>
Inserting into csv files using Jet and System.Data.OleDb
Posted by cameron.waldron@gmail.com at 4/24/2008 9:13:36 AM
I'm trying to insert data into a csv file using System.Data.OleDb but
I'm unable to insert rows with character fields bigger that 255
characters.
the code:
const String INSERT_STATEMENT = "insert into [table#csv] (SmallStr,
BigStr) values (@SmallStr, @BigStr)";
OleDbConnection ... more >>
Underscore ("_") prefix added to my Column Name
Posted by r0bb1e at 4/23/2008 11:01:01 PM
I manually created a DataTable in a Typed DataSet using the DataSet designer
in VS 2008 Pro. One of the Column names is "IN". When referencing this
table in VB.Net 2008, the IntelliSense did not show the column "IN" but it
did show a column "_IN'. If I tried to reference this column in cod... more >>
Trapping nulls for SequetialAccess
Posted by jonefer at 4/23/2008 2:42:00 PM
I have a group of records in a set - usually 5-10 rows. For example
ProviderPanel would have several elements. I do this so I can handle the
formatting of each value on a case by case basis.
A typical scenario would be that before writing any records to either labels
or a class, I should t... more >>
ado.net entity framework newby question
Posted by doph at 4/23/2008 1:41:41 PM
Hi,
I have downloaded and installed beta 3 of Ado.net entity framework and
played with this a little bit and it's quite cool - I can query the
database and get the objects etc. The only thing I can't dig to is how
to actually create custom attributes in the classes that the framework
has gene... more >>
Direct navigation to specific rows in a DataSource...
Posted by Rafael Soteldo at 4/23/2008 5:04:00 AM
Hi there:
I need to get the position of a given Row to navigate directly to it, in a
form that has a BindingNavigator and several TextBoxes showing each rows
details...
I dragged the fields from the Data Sources window to the form in the
designer, which created the BindingNavigator attac... more >>
LINQ with Datetime
Posted by Ant at 4/23/2008 2:27:01 AM
Hi,
How can I use a date string to test a date in a LINQ query.
Below is a query in Northwind
Many thanks for any help
Ant
NorthwindDataContext db = new NorthwindDataContext();
var resultSet = from o in db.Orders
where o.OrderDate >= Convert.ToDateTi... more >>
OleDb delays commits and unlocks?
Posted by John W. at 4/22/2008 8:33:06 AM
I've seen other posts with similar problems, but no solutions. I have two
hair-pulling dilemmas that have been frustrating me for months now. Is there
no solution? (C#.NET, Framework 2.0, Jet OleDb 4.0)
The general goal is to read one MDB file and copy relevant info into another
MDB file... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Connection works but returns no records
Posted by auntiejack56 at 4/20/2008 4:04:41 AM
Hi, I have been studying the books (2 ADO.NET and 1 VB.NET) and still
can't work out why the records in the database aren't being read.
>>>>
Dim sConString As String = "Data Source=.
\SQLEXPRESS;AttachDbFilename=""C:\Active Access Library\FigaroNET
\Figaro\Figaro\FigaroData.mdf"";Inte... more >>
Saving Data with DataAdapter to Jet DB
Posted by NYWGUY54 at 4/18/2008 5:20:00 PM
I am trying to save changes to a dataset using the dataAdapters update method
to an Access 2003 DB, therefore I'm using an OleDbDataAdapter to accomplish
this.
I am using a For/Next loop to change a single column of data in the
dataTable, & I know this works. The problem arises when I try to ... more >>
SqlCommandBuilder DeriveParameters Ouput Arg gets wrong direction
Posted by JM at 4/18/2008 9:17:01 AM
First, I am using the Enterprise Library DatabaseFactory to get a Database
object. I have traced the issue down to the SqlCommandBuilder
DeriveParameters method.
Given a stored procedure args:
CREATE PROCEDURE UpdDept
( @KeyDepartmentIdentifier UNIQUEIDENTIFIER,
@KEYTimestamp BINARY(8)... more >>
how to extract value from LINQ query?
Posted by SftwDude at 4/18/2008 5:53:02 AM
Is it possible to extract a single value from the results of a LINQ query
with out iterating over the results.
For example I have a table in SQL Server:
tblExample
Type int <--this is a key field
Descr nvarchar(5)
I would like to get the description (Descr) fi... more >>
Problems with LINQ and CLR Stored Procedure
Posted by Jules140 at 4/17/2008 11:04:52 AM
Hi all,
I'm having a bit of a problem with Linq and a CLR Stored Procedure.
I'm just trying to fill a gridview with a simple query that depends on multiple
(one to n) search terms.
The sproc is as follows:
ALTER PROCEDURE [dbo].[CMS_Pages_Search]
@searchString varchar(500)
AS
BEG... more >>
error that occur in StoredProcedure it's throw exception to Ado.net?
Posted by mttc at 4/16/2008 6:12:51 AM
I ask it before and I got this answer:
======================================================
yes errors with a certain severity level will throw exceptions in your
code
try this in your stored proc
RAISEERROR(N'This is a message %s %d', -- message text
16, --severity
1, --state
... more >>
SqlCommand.ExecuteReader takes too much time
Posted by Achim Domma at 4/16/2008 1:04:21 AM
Hi,
I have a table containing about 14,5 million records and I want to
iterate over the complete data. If I execute a "select * from
mytable", the call to ExecuteReader takes some hours to return. In T-
SQL I can open a cursor and start reading immediately. As far as I
understand, ExecuteRead... more >>
Querying a Runtime Dataset with LINQ
Posted by Ant at 4/15/2008 9:23:01 PM
Hi,
Can you query a run time Dataset with LINQ or must the Dataset be strongly
typed?
If not, how can this be simply accomplished?
Many thanks for any ideas on this
Ant... more >>
GC.Collect() not cleaning memory, how to find out what references to lots of memory still exist?
Posted by DR at 4/15/2008 2:03:04 PM
GC.Collect() not cleaning memory, how to find out what references to lots of
memory still exist?
When all my processign is done i set everything to null and then:
GC.Collect();
and then
GC.WaitForPendingFinalizers();
but it still shows that my process takes 400 MB of memory. Is there any ea... more >>
slowing/halting stored procedure from ado.net
Posted by MarcelG at 4/15/2008 4:41:01 AM
Hi,
I've strange problem with an application developed with VB.NET 2008/ADO.NET
framework target 2.0 and SQL Server 2005.
Sometimes a certain stored procedure wich normally executes in seconds,
suddenly takes forever (15minutes plus).
When I execute the stored procedure from within SQL Server... more >>
Open Source Typed DataSet Generator
Posted by Mythran at 4/14/2008 10:03:40 AM
Drawing a blank, even googling some keywords and still gives me either too
much or too little. Basically, anyone know of any custom open source typed
dataset generators for use with the 3.5 framework? I am looking for a
generator that exposes the column properties as public instead of
inte... more >>
ADOMD client
Posted by benny.watt@gmail.com at 4/14/2008 2:40:45 AM
I have a webserver talking to a different server hosting SQL 2005. The
webserver seems to need the ADOMD client on it..
Is this a seperate install? If so, is it free to install or is there
licence issues?
help is appreciated.... more >>
SQL Coalesce in Linq syntax
Posted by Dean Slindee at 4/13/2008 9:40:05 PM
How would the following SQL Coalesce statement need to be written in Linq to
SQL:
SELECT COALESCE(LastName, '') + ' '
+ COALESCE(FirstName, '') + ' '
+ COALESCE(MiddleName, '') + ' '
+ COALESCE(SuffixName, '') AS ClientName,
ClientID
FROM tblClient
WHERE LastName LIK... more >>
Datatable equivalent code with OleDbDataReader
Posted by John at 4/13/2008 3:27:52 PM
Hi
I have below code which is written using a datatable dt. What is the
equivalent code using a OleDbDataReader?
For j = 0 To dt.Rows.Count - 1
Dim dataArr(dt.Columns.Count) As String
For i = 0 To dt.Columns.Count - 1
dataArr(i) = dt.Rows(j)(i)
Next
Next
Thanks
Regard... more >>
OleDbDataReader to datatable
Posted by John at 4/13/2008 3:09:51 PM
Hi
Sorry, I am new to this. Is there a way to cerate a datatable from a
OleDbDataReader?
Thanks
Regards
... more >>
error that occur in StoredProcedure it's cause exception or not?
Posted by mttc at 4/12/2008 12:11:37 PM
error that occur in StoredProcedure it's cause exception or not? and
when I need to use with @@error?... more >>
Designer generated code fails to compile
Posted by Pat Moran at 4/11/2008 6:20:01 AM
I have a project whose default name space is Wearther and form in the project
which is in this default namespace. I have also generated a dataset and
adapters to access a table in a database. I am using as a datasource this
dataset via the generated DatasetBindingSource.
The problem is tha... more >>
export to csv
Posted by John at 4/11/2008 2:51:15 AM
Hi
Is there a way to export the records from a datareader into a csv file?
Thanks
Regards
... more >>
Calling a form in second project
Posted by John at 4/10/2008 8:25:14 PM
Hi
Can I run a from in one project from a second project, both projects being
in the same solution?
Thanks
Regards
... more >>
(oracle) problem with variable in 'in' condition
Posted by lilysdream@gmail.com at 4/10/2008 2:07:06 AM
Hi everybody !
I have a problem with a Select procedure in package.
I have a condition like :
select .....
from ....
where blahblah in (myvariable)..
'myvariable' is like : 1001, 1002, 1003, ....
I have an exception with the OracleDataAdapter : ORA-01002: fetch out
of sequence
do ... more >>
Varbinary col in datatable
Posted by Aurin at 4/9/2008 10:24:00 AM
Using SQL Server 2005, Visual Studio 2005 (8.0.50727.762) Framework 2.0.50727
SP1
I have a varbinary column in my database. I am trying to set the
DataColumn.DataType in the dataset designer to byte[] but it is not in the
selection list. I tried changing it in the xxxxx.Designer.cs file b... more >>
How to to handle a set that had a row added and then deleted before Adapter Update?
Posted by Jason at 4/9/2008 10:08:46 AM
I have a scenario where I am processing a batch of changes to a table. The
changes can result in an Insert or a Delete. So I Fill a DataSet with the
table's current contents, then I process the changes, then call Update on my
SqlAdapter. Psuedo Code:
Fill(DataSet, MyTable)
Foreach( Stateme... more >>
linqdatasource runtime connection string
Posted by Chuck P at 4/9/2008 7:37:00 AM
I want to set the connection string to use at runtime for my linqsql
datacontext.
I am using the dbml or mapper in Visual Studio.
The way I created objects was by dragging objects from the server explorer
onto the design surface.
When I dragged the first object it made a connection string i... more >>
SqlParamater where type=SqlDbType.VarChar allows a size of -1!!!
Posted by BillDoorNZ@gmail.com at 4/8/2008 3:01:54 PM
I've just finished writing some unit tests to test some SqlParameter
functions I created for a DAL helper class. I have included the base
version of the method below. One of the tests I wrote is a boundary
test and checks to make sure a size of -1 throw an
'ArgumentOutOfRange' exception. For som... more >>
Anyone know of a Silverlight newsgroup?
Posted by Brian K. Williams at 4/8/2008 12:56:57 PM
I am looking for a Silverlight newsgroup, I can't find one on
news.microsoft.com.
Thanks
Brian K. Williams
... more >>
Call Dispose on OleDbCommand?
Posted by JohnMSyrasoft at 4/7/2008 12:49:02 PM
1. Should you explicitly call Dispose on OleDb objects like OleDbCommand or
OleDbConnection?
2. In VB.NET for the keyword USING (as in "Using cn As New
OleDbConnection(...)...")
Should you explicitly call the Close method on the OleDbConnection object or
will the object be closed and d... more >>
OutOfMemoryException using .NewRow
Posted by TexasAggie96 at 4/7/2008 7:09:46 AM
I am dealing with a very large amount of data add it to a dataset
using DataTable.Rows.Add. When creating the new row using .NewRow I
get an OutOfMemoryException at around row 4 million plus. I know
that
this is a very large number of rows, but I have 4 GB of Ram and the
Task Manager shows th... more >>
How to fill a listview from LINQ query
Posted by Dean Slindee at 4/6/2008 8:28:25 PM
Currently using a legacy Winform listview, that is filled by a function from
datatable(0) in a dataset. This works fine as the datatable has column
headers and data rows that correspond to listview headers and listview rows.
Would like to use Linq to SQL to populate the same legacy WinForm l... more >>
Add column using Dataset Designer => hosed project
Posted by Molon Labe at 4/5/2008 12:36:01 PM
Context:
VS2008
SQL Server Compact 3.5 database
Problem:
I used the Dataset Designer to add a column to a table (right click on table
in designer, Add->Column).
How do I update the database to correspond with this change?
I tried locating the database in my Server Explorer and addin... more >>
How to Update an existing schema on a typed dataset
Posted by socamb at 4/4/2008 6:11:00 AM
I need to do what seemes a simple task, but i am stuck. I have a
column in my database i need to change from 7 chars to 10 chars. I
have a number of strongly typed datasets in my system that use this
table.
I attempted to edit the xsd file in the designer and changed the 7 to
a 10.
But... more >>
Replacement for dataadapter
Posted by Harsha at 4/4/2008 5:22:36 AM
Hi Experts,
I am having new problem again.
This is regarding SqlDataAdapter fill method performance. Even though
its discussed several times my problem is little different.
I had migrated one VB6 application to .Net 2.0. In VB6 application
they were using RecordSet.
Like,
--------------... more >>
Databinding to a listview
Posted by Ant at 4/4/2008 5:11:00 AM
Hi,
I'm trying to populate a list box using a dataset. The data set is tested
fine to have data in it but when I run the app, the listbox does not get
populated. Below is what I'm doing:
Class1 myclass = new Class1();
myclass.Server = "LAPTOP";
myclass.DB = "Northwind";
... more >>
Where to: Questions About EDM and CSDL
Posted by CharlesRCaplan@gmail.com at 4/3/2008 2:21:56 PM
We are about to start serious design on a new app here. I would like
to use the Entity Framework stuff that's new in Framework 3.5 and
since it's not even officially released yet, I'm sure to have some
questions. So my question is
"microsoft.public.dotnet.framework.adonet" the best group to ask
... more >>
How to read sequentially from a random point in a large Xml File. (200 - 2000 MB)
Posted by Schwartzberg at 4/3/2008 1:02:00 PM
Hello
Have a huge XML file with multitudes of "LogEntry" nodes / text
lines.
A small sample of this xml/text content is below.
The file could be anywhere between 200 to 2000 MB.
My questions comes in two parts.
(A)
I would like a solution (or ideas for it), in C#, -- to randomly
access ... more >>
Question to the generals in this newsgroup including MSFT's
Posted by Cor Ligthert[MVP] at 4/3/2008 7:15:57 AM
Is this a FrameWork.ADONET or a LINQ newsgroup?
As I see so many non LINQ to ADONET questions answered at the moment.
Cor... more >>
Reading a text field
Posted by Josh at 4/2/2008 4:58:02 PM
How do I get the data out of an MS-SQL Text field efficiently
A simple "SELECT [FieldName] FROM [Table]" unfortunately returns a truncated
version of the fields contents ( which actually contains an entire book ).
I know that your not supposed to do a simple select, but my Google-Fu is
wea... more >>
SQL 2005 Error connecting to SQL2000
Posted by Ant at 4/2/2008 3:20:00 AM
Hi,
I'm connecting to an SQL2000 Server, it runs a very slow SP that takes
around two minutes. I've set the command & connection timeout to handle this.
It used to work fine but now I get a seemingly unrelated error. I can connect
remotely to do simple queries & LINQ queries but the SP doesn'... more >>
Linq SubmitChanges and DataLoadOptions
Posted by Chuck P at 4/1/2008 1:34:01 PM
I have some code that has a DataLoadOption to load Master/Detail records.
When I update the Master table, the object gets returned but the Details
records are not loaded. Is their a work around for this?
using (MyDataContext dc = new MyDataContext())
{
... more >>
linq combined query
Posted by Chuck P at 4/1/2008 10:05:01 AM
I tried to make some complex linq queries easier to read by pulling some of
the queries out.
This works fine:
var qAllJobDescriptions = from j in dc.Jobs
select j;
var qAllOracleJobCodes = from o in dc.OracleJobCodes
... more >>
|