-
- Freakin TableAdapter! System.Data.ConstraintException
by xr280xr
- 2 Replies
- Last post
by xr280xr
- Hi, I'm getting the ol'
System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
error from one of my table adapters even though "EnforceConstraints" is turned off on the DataSet. Usually I solve this by deleting the TableAdapter and re-adding it to the dataset, but this time tha
-
- Deserializing-giving lot of pain
by mmx_scamper
- 2 Replies
- Last post
by ChunSheng Tang - MSFT
- Hi, In the below mentioned code,I'm trying to deserialize the given XML into an object graph of type Message.Find the code below...
Code Snippet
using System; using System.Collections.Generic; using System.Text; using System.Xml.Serialization; namespace TestXML { public class Program { static void Main(string[] args) { string xml = "< xml version=\&q
-
- Exception from background thread kill webserver
by fhtino
- 4 Replies
- Last post
by Nisha Nambissan
- Hello,
from asp.net code, I create a thread and run it. The thread run in background. The main thread (=asp.net page code) does other activities and then waits for the background thread to finish.
But, if the background thread throws an Exception, the web server (iis or the WebDev server in vs2005) crashes. This is the behaviour of Asp.Net 2.0 (asp.net 1.1 did not crash).
( http
-
- .NET Runtime Optimization Service causes slow machine
by KevinBurton
- 4 Replies
- Last post
by BillWert - MSFT
- For some reason (that would be one question) my event log is filling up with messages from ".NET Runtime Optimization Service". It seems that this "service" makes event log entries almost every second and sometimes more than one a second. I think this is causing my machine to be extremely slow. Can I stop it How long does it take and should I just wait it out
Thank you.
-
- C# Console App. Freezes after Filling Datatable Inside a Loop
by GIST Programmer
- 0 Replies
- Last post
by GIST Programmer
- I am running a console application on a Windows 2003 Enterpise Edition 64-bit Server, using VS 2005 and .Net Framework 2.0. My program is using .Net Database access components and ESRI's ArcObjects (COM) components to do GIS Spatial Analysis for modeling. The problem occurs in that I have to do an SQL sort and join to fill a datatable with a few million records and 4 columns. On the second pass in
-
- how to zip an Xml Document
by Jehan Badshah
- 13 Replies
- Last post
by Mark Dawson
- Dear All,
I found a library (name Chilkat ) through which i can easily zip(compress) xml file, but it has only 30 days evolution period, could any one please show me way how to compress xml.
thanks
-
- RightToLeft RegexOption
by Jan Ku&#269;era
- 1 Replies
- Last post
by Sergei Z
- Hi,
If the CurrentCulture is RTL, do I have to specify RightToLeft option when constructing the Regex object
If not (and RightToLeft is just to force such evaluation in LTR culture), why there is no LeftToRight one to do the same thing in RTL culture
Jan
-
- File.copy with version control
by meho_tarevci
- 2 Replies
- Last post
by meho_tarevci
- hi everyone
I have question about File.Copy function
I use following syntax to copy a file from one destination to another.
File.Copy (source_file, new_file);
Now when I copy my file to new location I want it to add "version 1." at the end of my file. Next time when I copy SAME file from ("source_file") to SAME destination location it should increment
-
- C# and Access Connectivity on 64bit machine
by Mohit Bhutani
- 7 Replies
- Last post
by Caddre
- We are extensively using Ms-Access database in our applications since long time. Currently we are developing one of our applications in C# which is using Ms-Access as a backend. In my application I used ADO.NET and Microsoft.Jet.OLEDB providers. It works in Win32 environment. We are unable to compile this application on 64-bit machine. I am getting the following error:
"The 'Microsoft
-
- Accessing a password protected file.
by DavidThi808
- 7 Replies
- Last post
by Peter Ritchie
- Hi;
Note: While our specific use is ASP.NET, this is a general "reading a file" question.
Our ASP.NET application allows a user to give it an XML filename and the app then opens that file as a datasource to generate a report. The issue we face is we do not want the file opened using the credentials of the user that our ASP.NET app is running under for two reasons:
The ASP.NET
-
- Tell a file from a directory. (FtpWebRequest)
by David S. Anderson
- 6 Replies
- Last post
by Mariya Atanasova - MSFT
- I am using an FtpWebRequest to retrieve the list of files on my FTP server. This works fine, and I have it so it adds all of the files/directories to a treeview, but there is a problem. I need to tell the difference between a file and directory. Since the FtpWebRequest method GetList only returns a string list of files, I only have the name to work with. So with this information, how can I determi
-
- Puzzled by performance charactersitcs
by pkr2000
- 5 Replies
- Last post
by pkr2000
- I've written a very simple program to test loading an assembly from a database, invoking a method (which tight loops to a large number). Now I run this on a number of threads but I get results that I can't concretely explain. To make things easy I've simplified the timings. 1 thread takes 10 seconds 2 threads take 13s each 3 threads take 17s each 4 threads take 20s each PS. I've tried loading the
-
- FTP Upload (Simultaneous Upload)
by Leedo
- 0 Replies
- Last post
by Leedo
- Hi, I have been working for sometime with VB 2005 code to FTP upload. My target is to upload all files from a local directory to multiple FTP servers. I was able to do that but sequentially. I was able to do that with two methods, using FtpWebRequest and My.Computer.Network.UploadFile. However, I need to do transfer all files in parallel rather than sequentially. I know I can use threading I just
-
- .net profile - saved twice...
by remo.waller
- 3 Replies
- Last post
by Brendan Grant
- hi,
I'm using a asp.net profile to save user information. E.g:
[Serializable]
public class UserAddress
{
public UserAddress() { }
#region Property: Street
private string street;
/// <summary>
/// Gets/sets the Street
/// </summary>
public string Street
{
[System.Diagnostics.DebuggerStepThrough]
get { r
-
- Determing if a URL is on the local network
by Re12345
- 1 Replies
- Last post
by Mike Flasko
- I've got a URL and want to know if the address is on the local network or on the internet. I can use GetHostEntry to resove the address, but if it is on the internet and my local DNS server can't resolve it, it takes 15 sec until I get the exception... How can I set the timeout value to 1 sec Or ist there any other way to find out this Thanks for your help!!!
-
- Strange EventLog messages
by zero.one
- 8 Replies
- Last post
by zero.one
- When I execute this C# code:
EventLog .WriteEntry( "Application" , "My message" );
The following appears in the event log:
The description for Event ID ( 0 ) in Source ( Application ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use
-
- Windows Service Unexpectedly Terminates
by Colmeister
- 8 Replies
- Last post
by Swapnil Kulkarni
- I have a Windows Service that uses asynchronous socket io to listen for requests from VB6 clients, it was originally written in VB.NET 1.1. When I upgraded to .NET 2.0 it kept terminating unexpectedly and I tracked this down to the breaking changes introduced in .NET 2.0 regarding unhandled exceptions on threadpool threads. I now have improved exception handling on threadpool threads and an event
-
- NetworkStream.Close doesn't close the underlying Socket
by weiqj
- 4 Replies
- Last post
by weiqj
- I created a NetworkStream with a Socket return from socket.EndAccept(). When the connunication is finished I called the Close() method on the stream. However the client side is not notified about the closing of the socket. The blocking read on client side will wait forever. However, if I call Socket.Close() instead of NetworkStream.Close, the client side is notified. Is there anything wrong with t
-
- System.FormatException was unhandled - Help!
by medion123
- 6 Replies
- Last post
by nobugz
- Hello,
I've been trying to port some VB code to C#, but i seem to be having trouble with porting the CInt function.
Here's my VB Code [Note: It is VB6..., Not VB.NET]:
Code Block
Public Function SplitClientData(SData As String, Index As Integer) On Error Resume Next Dim x As Integer Dim Offset As Integer Dim Message As String Dim TheNum As Integer Dim ToDo() As String
-
- You can have strongly-typed DataTables, or you can have nullable columns. Choose one.
by Robert Rossney
- 14 Replies
- Last post
by Robert Rossney
- I have a SQL Server database containing a table that includes smalldatetime and bit columns. These columns are nullable. I add a DataSet to my project, drag the table from the Database Explorer window to the DataSet designer surface, and in a matter of moments I have a shiny new FooDataTable class. The BirthDate column, I see, has AllowDBNull set to True, and <DBNull> as its default value. A
-
- Finding strings in a line
by edukulla
- 2 Replies
- Last post
by nobugz
- Hi
I have a text file which contains some lines of information. I was able to read each line from the file by using
streamreader class and readline method. Now, I have some keywords to search for in this line and then note down this line in to some output. Do we have any methods to compare these keywords in the line.
Any help on this is highly appreciated.
Thanks!
-
- advantage of CLR over JVM
by Sekar Thangavel
- 2 Replies
- Last post
by Michael Nemtsev
- Hi,
I want to know what is the advantage of CLR over JVM
-
- Using different connectionstrings with AccessDataSource
by Curt Broyles
- 2 Replies
- Last post
by Curt Broyles
- I've taken on a project of creating an asp.net site that lets the user select from a list, common names of Access databases on the server they'd like to run a select statement against.
When the user selects the Access database they want, I wish to use the associated connection string for that database to perform the query and populate a grid.
I'm having difficulty. I don't want the
-
- Extracting a System::String from text written via a StringWriter
by eldiener
- 2 Replies
- Last post
by eldiener
- I am using a System.IO.StringWriter with a System.IO.MemoryStream as the backing stream. After writing text data using the StringWriter's Write method, I want to extract the data I have written from the underlying memory stream to a System.String. How do I do that I tried first extracting the data from the BaseStream memory stream using its ToArray method, and then converting this array of unsign
-
- JIT
by Deepraj_Majumdar_35eaf1
- 1 Replies
- Last post
by nobugz