all groups > dotnet ado.net > february 2006
Filter by week: 1 2 3 4
Row index property in DataTable.Rows collection?
Posted by Bradley at 2/28/2006 10:38:15 PM
Hi,=20
I understand that a DataTable has a collection of Rows. If it is a =
collection, why is there no obvious way to get an index property from =
any given row?
Example code:
....
int myIndex;
foreach (DataRow myDataRow in myDataTable.Rows)
{
// I need to get the zero-based inde... more >>
Join Two datasets
Posted by Imran Aziz at 2/28/2006 4:54:09 PM
Hello All,
I have a dataset that I populate using a SQL Server database, and the
second one that I populate using a mySQL Server database, I need to combine
the results in memory and then sort them, how do I go about doing that ?
This is a search query, so I do not want to create another ... more >>
XML string to ADODB.Recordset?
Posted by Richard Lewis Haggard at 2/28/2006 12:39:51 PM
I have a function that returns an XML string that represents a Recordset. Is
it possible to use this string to populate an ADODB.Recordset and, if so,
how?
--
Richard Lewis Haggard
www.Haggard-And-Associates.com
... more >>
SQL Server Express - Detach & Shrink
Posted by elziko at 2/28/2006 11:34:25 AM
When a user of my application has finished with the database it must be
ready to be moved to any other machine for use by another user. For this I'd
like to detach and shrink the database (its in the default simple recovery
mode) and so I'm using SSEUtil from within my code to accomplish this.... more >>
OleDBDataAdapter update and getting original DB values
Posted by Mark Atkinson at 2/28/2006 11:22:28 AM
After update some modified data using an OleDBDataAdapter's Update method, if
there are concurrency exceptions, is there any way to get at the values that
are currently in the database without having to do another trip to the
database or calling OleDBDataAdapter.Fill?
I thought that having th... more >>
ado.net/sql rpoblem
Posted by ivansi at 2/28/2006 10:52:28 AM
Additional information: Cannot change ReadOnly property for column Expresion.
This is an error I got. I made three alias field and and I want to fill them
with textBox(ReadOnly) values.
with method NewRow I tried to add new rows with string values but I got this
message above.
What should I d... more >>
TableAdapter Fill() returns SQL syntax error for data type bit
Posted by Ronen at 2/28/2006 5:25:15 AM
Hi,
When calling the Fill() method for a TableAdapter I get the following error:
"syntax error converting the varchar value 'TRUE' to a column of data type
bit"
The typed DataSet to be filled maps the SQL bit columns to a System.boolean
column ('TRUE' instead of 1).
Any workaround for ... more >>
String was not recognized as a valid DateTime
Posted by Herby at 2/28/2006 4:17:15 AM
Hi im relatively new to both .NET and ADO.NET.
Im having a problem with dates when using SQL.
I have something like:
effective_date = '1/1/1990'
Iv then tried things like
effective_date = {ts '1990-01-01 00:00:00'}
Whatever i try i keep getting the following exception.
String was not ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
URGENT...Please suggest how can we implement transactions at BAL in 3 tier architecture not in DAL.
Posted by ravi.vaswani NO[at]SPAM gmail.com at 2/28/2006 12:11:22 AM
Hi,
Please suggest how can we implement transactions at BAL in 3 tier
architecture not in DAL. also objectcontext object which was used with
ASP will be requiered to do this.
Thanks
Ravi
... more >>
Using Stored Procedure at sqlDataAdapters with output parameters
Posted by Esref DURNA at 2/28/2006 12:00:00 AM
declare @Count int
select @Count = COUNT ( * ) FROM tblXUDUserShip
select FirstName,SurName,@Count AS BankaSayisi FROM tblXUDUserShip
I have a Stored Procedure Which Ends with these returns.
I Create a SqlDataAdapter with a sqlcommand with type stored procedure
I m using this SqlD... more >>
How to get the memo field from *.fpt file of foxpro database?
Posted by szasam001 at 2/27/2006 11:08:28 PM
I have connected to the foxpro free file a.dbf with odbcconnection,and
I can read data from common field,but how to get the memo field value
from *.fpt file?
DataRow dr = ds.Tables[0].Rows[i];
StringBuilder strb = new StringBuilder();
strb.Append("<rec>\r\n");
strb.Append("<title>=... more >>
SqlDataType.Decimal rounds to zero !?
Posted by Andre Ranieri at 2/27/2006 5:25:16 PM
Hi, I'm writing a module to insert records to the main accounts table in our
CRM database. I've noticed in testing that the tax percent, which is a
decimal data type with length 5, default value (0), precision 9 and scale 6
always enters zero.
I've noticed if I run the test T-SQL statement... more >>
XML Output doesn't include NULL TextBoxes in Table areas
Posted by Maxwell2006 at 2/27/2006 5:13:08 PM
Hi,
I have a Table in my report and I chose "AttributeNormal" for
DataElementStyle property of the all text boxes within the table's detail
row.
The problem is that SQL RS doesn't output text boxes with null values.
Is there anyway to force SQL RS to output null textboxes a... more >>
Any ADO dot net form examples?
Posted by Vayse at 2/27/2006 1:05:26 PM
Hi
Has anyone got some sample code they are willing to share? I'm looking for
a form, with Save, Navigate etc. buttons. (Not a drag/drop form with binding
source and table adapters.)
I don't have any particular problems, just want to see if I should be doing
better.
thanks
Vayse
... more >>
Is there a way to filter column precison after filling the table?
Posted by Eric at 2/27/2006 12:41:29 PM
I would like to use the same stored procedure for two different end uses,
but in one use the user requested that I limit all decimal fields to 3
digits after the decimal point and for Date fields to omit the time of day.
I am not sure we can do this on the SQL end, so I am researching how we ... more >>
Milliseconds are truncated when inserting DatTime in Sql Server
Posted by eacsub at 2/27/2006 12:37:27 PM
check the InternalTicks for the date1 and date and see what I mean. What the
hell?
string connString = "Data Source=(local);Initial Catalog=Test;Integrated
Security=True";
SqlCommand command = new SqlCommand("insert into Table_1
(CreateDate) values (@date)");
DateTime date... more >>
Measuring connection traffic
Posted by Bojan Kuhar at 2/27/2006 11:30:24 AM
Is there a way of measuring traffic on the SQL connection? I have a Windows
Forms app connecting to SQL 2000. I'd like to how much traffic certain parts
of the app are generating.
... more >>
How to fill a datatable with data from another datatable
Posted by Coen at 2/27/2006 7:55:11 AM
Hi, can anyone advice me in the following.
My steps to perform are:
1) Importing data from csv-files into datatables of a typed dataset (the
input tables)
2) I need to fill other datatables based on the datatables in step a (the
output tables)
3) The datatables from step 2 are used to crea... more >>
Does .NET Framework Data Provider for Oracle also have a CacheType feature like OraOLEDB?
Posted by Sunil Menon at 2/26/2006 10:28:12 PM
Dear All,
Does MS supplied .NET Framework Data Provider for Oracle also have
a CacheType feature like OraOLEDB?
Also if the value is set to file where is the file stored? on the DB
server or on the client?
Here is the description:
OraOLEDB-specific connection string attributes which affe... more >>
101VB Samples
Posted by Jerome at 2/26/2006 5:58:54 PM
Hi,
Has anyone ever been able to get the samples from Microsoft (101 VB samples)
to work?
I wanted to try the "CreatingMasterDetails" and this is what i get from the
start:
Invalid column name 'DepartmentID'.
Invalid column name 'BaseRate'.
PLUS....
My AdventureWorks database is corrup... more >>
ORA:12154 TNS Could Not Resolve Service Name
Posted by Ram at 2/26/2006 11:25:21 AM
Hey,
I'm using ODP.Net on my server.
Until recently I had ODP version 9.2.0.2102 and now I've upgraded to
9.2.0.700.
All my applications that upgraded to 9.2.0.700 work perfectly,
But all the old applications still compiled with the 2102 version
receive:
ORA:12154 TNS Could Not Resolve Servic... more >>
DataGrid and DataGridView poor binding performance?
Posted by mtczx232 NO[at]SPAM yahoo.com at 2/26/2006 3:57:02 AM
I check it on P4 2.7 and 1G Ram. I load 898,000 rec to table (37 sec
with slow HD),
when the program begin binding DataTable to DataGrid or DatagridView by
doing grd.datasource=mtTable is take 100 sec!??
I'm very surprise! (it seem that DataGrid have selef data storage?)
I supose that DataGri... more >>
Consuming RSS Feeds
Posted by Francis at 2/25/2006 8:42:12 PM
Hello,
I recently decided to try and consume an rss feed and put it into a
datagrid, just to try it out. I used the following code:
DataSet dsXml = new DataSet();
XmlReader xmlTr = new
XmlTextReader("http://www.flickr.com/services/feeds/photos_public.gne?format=rss_200");
... more >>
Exporting data from a DataTable in format other than XML
Posted by michael at 2/25/2006 1:43:27 PM
Is there a simple way to export the data from a DataTable (or even better a
DataView) in a format other than XML? In particular, how about a simple way
to export and save data directly to a new .xls file. I guess that if I needed
to I could write a line at a time to a .txt file and create a ta... more >>
Dynamic SQL generation - How do I set the key column information manually?
Posted by Rune B at 2/25/2006 1:14:09 PM
I use in my datalayer the following methods to fill and update data, and it
works like a charm.
But recently I had to add a dimension to the SqlServer table, - a new field
that allowed more than one instance of the same customer (same customerID)
in the table. And of cause that meant I had ... more >>
character sets in .net
Posted by Dror at 2/25/2006 7:22:27 AM
Hello,
I'm developing a winforms applciation which retrive data using ado.net.
My Database has an WE8ISO8859P1 character set and the data is in hebrew.
My Problem is when I'm trying to retrive the data I get "??????".
When I retrive the same data from a vb6 application using ado
I don't have... more >>
bug: increasing ADO.NET 2.0 timeouts ?
Posted by herbert at 2/25/2006 7:04:27 AM
Reading the MP3 header of hundreds of MP3 files in many subdirectories
results in an exception (Vs.2005, VB.NET):
"The CLR has been unable to transition from COM context 0x1a1c68 to COM
context 0x1a1dd8 for 60 seconds. The thread that owns the destination
context/apartment is most likely eith... more >>
Help Please ADO .Net 2.0 Query at RunTime HELP
Posted by spooke at 2/24/2006 8:52:07 PM
HI all
now are two days, 20 hours of work that i'm on this problem without =
a solution!!!
I think i'll become mad!!!
Here is the problem:
I Use C# 2.0 (VS .Net 2005) with thyped dataset
I Make my connection and the connection generates the DataTables and the =
TableAdapters
All ok r... more >>
How to get the record lock status in .net
Posted by Joy at 2/24/2006 4:08:58 PM
Hello:
After one transaction be started, but before the transaction be commited, if
another transaction query the same records, how to get the locked status of
the records.
Thanks.
... more >>
How to get the record locked status in .net
Posted by Joy at 2/24/2006 4:04:55 PM
Hello:
After I start a transaction with "REPEATABLE READ", before I commit, if I
begin another transaction to the same records, how can I get the locked
status of these records?
Thanks.
... more >>
Need help with CDONTS or other object to receive mail in a specific way
Posted by Vanessa Lee at 2/24/2006 2:21:14 PM
Hello,
Is it possible to write a script using CONDTS object to read all emails from
the SMTP IIS "Drop" folder without changing the username and email address
in LogonSMTP? or is there completely another way to do it. Here is what I
want exactly the program to do:
I just want to have one sc... more >>
Problems with Custom Databinding
Posted by Vivek M at 2/24/2006 12:23:46 PM
Hello there,
i am running into a databind issues. I am trying to bind a dataview to
collection of user control which are all child of another user control. The
problem is i get the same first row data in all the childrens. Here is my
code:
I call this function in the parent control to ad... more >>
newbie: DataSet update question
Posted by deko at 2/24/2006 11:59:15 AM
I can get my DataSet to update with code in the constructor of the class
that creates the DataSet, but not using a method in that same class.
Why is this?
private DataSet projectData;
//this is the constructor of class AsaDataAccess
public AsaDataAccess()
{
projectData = new Data... more >>
SqlCommand slow on INSERT
Posted by John Bailo at 2/24/2006 9:43:03 AM
I have a c# program that loops through a table on a DB2 database.
On each iteration it assigns data to values in the SqlParameter
collection. The command text is an INSERT statement to a Sql Server
database, run with an .ExecuteQuery I enclosed the loop in a
SqlTransaction and commit ... more >>
MissingSchemaAction.AddWithKey fails with DISTINCT
Posted by Howell Page at 2/24/2006 4:43:30 AM
I'm using a SqlDataAdapter to fill a DataSet with MissingSchemaAction
set to AddWithKey. Normally it discovers the table's primary key
successfully, but when I added DISTINCT to the query, it failed to set
the PK. Is this a known issue, and is there are workaround?
Here's some example code.
... more >>
creating database and database tables programmatically(SQL-Server2
Posted by herbert at 2/24/2006 4:19:28 AM
1) I assume there is a better way than good ol' ADOX or inline SQL in .NET
2.0 and SQL Server 2005 to create/delete databases and database tables and
get metadata about tables from .NET 2.0 code.
Which classes do I have to use?
2) Another frequent request on my list is dedecting all SQL-Serv... more >>
format problem using msacess database
Posted by rt at 2/24/2006 2:06:27 AM
hi iam using vs.net 2003, vb.net,Ado.net
msacess, a field is date/time
and format dd-mmm-yy hh:nn:ss
when i try to use this
dr("insp_datetime") = Format(Convert.ToDateTime(D), "dd-MMM-yy HH:mm:ss")
but the data in msaccess looks like this
24-Feb-06 0:00:00
i want to appear in like this ... more >>
NullReference Exception on DataTable.Rows.Add
Posted by Raistlin at 2/24/2006 12:24:27 AM
Hi,
I would just like to advice on how to fix a problem I'm having in adding a
new row to a DataTable.
Anyway, my problem is that this code always gives me the dreaded "object
reference not set to an instance" exception:
[C#] (WinForms)
DataRow row;
row = DataSet.Tables[0].NewR... more >>
Q: Whitespaces in WHERE
Posted by G .Net at 2/24/2006 12:00:00 AM
Hi
I'm hoping that somebody can help me with the following:
Is there a way to perform a WHERE search where white spaces are ignored? For
example, suppose I have a field called [CompanyCode] which has entries likes
"aaa 65", "bb 5 44" etc.
How can I do something like
SELECT [CompanyCode... more >>
TableAdapter and ROW_NUMBER problem
Posted by rpuertas at 2/24/2006 12:00:00 AM
Hello,
Visual Web Developer 2005 Express Edition and SQL Server 2005 Express: I
want to run a paged query within a TableAdapter. In the TableAdapter Query
Configuration Wizard" I write the next query:
SELECT usu_id, usu_name, usu_password
FROM (SELECT TOP (@StartRowIndex + @NumRows - 1... more >>
ADO.NET error
Posted by David R at 2/23/2006 6:04:27 PM
Maybe someone can see what I am missing. I have a class making a call to a
stored procedure:
cmd.CommandText = "spSubjectCodesUpdate";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@subjectcode", SqlDbType.VarChar, 4, subjectCode);
cmd.Parameters["@subjectcode"].Directi... more >>
RowFilter Failing
Posted by Spence at 2/23/2006 3:46:28 PM
I hope someone royally owns me using my own stupidity but follow this
thought process if you will.
vs.net 2003 .net 1.1, MSDE
I have a table with three fields:
PatientsDisplayImageTypes
PatientsDisplayImageTypeID (GUID), PatientID (Guid), ImageTypeID (Guid)
PK FK FK
... more >>
Connections in pool not being reused
Posted by David Kirkman at 2/23/2006 8:29:10 AM
I have a C# Windows Forms app. (Framework 1.1 VS 2003) using a SQL
Server 2K database. It appears that despite closing and disposing all
connections immediately after use and always using the same connection
string the connections in the connection pool are not being reused.
When the code attemp... more >>
Weird Duplicate Change Event Error from XSD.exe
Posted by Mark Olbert at 2/23/2006 8:17:25 AM
Can someone explain to me why the following simple dataset:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="meter_params">
<xs:complexType>
<xs:sequence>
... more >>
ODBC Microsoft Access Driver
Posted by somersbar NO[at]SPAM yahoo.com at 2/23/2006 8:13:07 AM
hello all,
im trying to connect to a microsoft access database from an ASP.NET web
form.
i keep getting the following error though:
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Could not use
'(unknown)'; file already in use. ERROR [IM006] [Microsoft][ODBC Driver
Manager] D... more >>
Cascading Deletes in ADO.NET (Please Help!!!)
Posted by rguarnieri at 2/23/2006 7:47:29 AM
Hi !!
I'm trying to delete a record in a parent/child relation, so, when I
want to delete a parent record, the childs will be deleted
automatically. Does anyone have an clear example of how to use
cascading deletes using ado.net in visual basic 2005? I didn't find any
example for this problem... more >>
CommandTimeout
Posted by Carl Howarth at 2/23/2006 2:01:44 AM
Hello all,
Just a quick Q.... If my query reaches the command timeout limit I set, will
ADO.NET automatically kill the process on SQL Server?
Thanks
--
Carl Howarth... more >>
Book recommendations
Posted by Toby Groves at 2/22/2006 11:19:27 PM
Just a quick question, not strictly on-topic for this group but I'm
hoping the assembled wisdom in here can help me out :)
Can anyone recommend any good books that deal with multi-layer software
design, of the presentation/business logic/data access type structure?
I'm trying to organise a ... more >>
Can UNC path be used as Data Source argument in OLE DB connection string?
Posted by GY2 at 2/22/2006 4:09:47 PM
I'm having some trouble getting this to work and can't find any reference to
whether or not it's okay. It must be legal I'm betting.
... more >>
How retrive data in sqldatasource?
Posted by VB Programmer at 2/22/2006 2:39:45 PM
I have a sqldatasource on a webform. How do I (in code) retrieve the value
of a particular column in the first row? Do I have to save the
sqldatasource SELECT results into a datatable and look at it that way? Code
samples would help.
Thanks!
... more >>
|