I want to know domain type of scema for a select in SQL Anywhere.
SQL:
CREATE DOMAIN "followinteger" INTEGER NULL;
CREATE TABLE "DBA"."test" (
"follow" "followinteger" NOT NULL,
"test" INTEGER NULL,
PRIMARY KEY ( "follow" ASC )
);
C#
SACommand command = conn.CreateCommand();
command.CommandText = "SELECT * FROM USERS";
...
Using a delegate I can call any function asynchronously.
From the documentation I understand this is done by queueing a workitem for the threadpool.
One can also do asynchronous calls to IO functions (like reading from sockets, files, webpages, etc). I think (but I'm not sure) this does NOT spawn a workitem in the threadpool. Only after...
I develop the desktop application running under WinXPSP3 that should communicate to the other application, located at the mobile device running under Windows Mobile 2003/2005 and docked to the host with ActiveSync running. I have searched for some mechanism that looks like WCF, but failed to find any. Does BCL contain any classes that ca...
In my WPF application I communicate asynchronously with a server. The callback will hence not be run in the UI thread, and as I need to do some WPF stuff there (create InkPresenter object) I need it to be run on the UI thread. Well, actually the requirement is that it is run on a thread with STA apartment mode. I tried creating a new thr...
Hi,
Given two app domain :
in the first, Library1 and CommonLibrary are loaded. In the second Library2 and CommonLibrary are loaded.
Library2 defines a Library2Exception that inherit from CommonException (defined in CommonLibrary).
When I call, in the first AppDomain, a method on a MarshallByRef of the second AppDomain that throws a Li...
What is the Purpose of C# constructor extern modifier?
I know about usage of extern METHODS to invoke Win32 functions, but what about CONSTRUCTORS?
Please give the practical example.
Not this:
class MyClass
{
public extern MyClass();
}
...
The question is in the code. Cannot understand why this is happening.
private void listView_DrawItem(object sender, DrawListViewItemEventArgs e)
{
// This works Ok
if (e.Item.Selected)
{
// ...
}
// This works wrong!
// e.State is always Selected! Why?
if ((e.State & ListViewItemStates.Selected) != 0...
I changed the signature of one of my web methods in a web service and couldn't get it to update, so now I've removed the whole method and rebuilt the project and that removed method still shows up and works!
Is there a WebService cache in Visual Studio I don't know about?
I've cleaned, rebuilt, built the project, even searching the pro...
Using the MVVM pattern creating WPF applications you have the ViewModel providing data to the View. I've met a situation where I find it reasonable to create WPF objects in my ViewModel, and the View fetches these and shows them. More specifically I have functionality for drawing where I need to store an InkPresenter in the end. I receiv...
Hello all,
I am trying to find a way to print a document that is stored as a BLOB without having to first open it, the filename is stored as well so I have the extension of the file available. The only idea I have had is to save it in the users temporary folder and then point the PrintDocument class to it but im sure theres a better way...
Hello everyone,
Like you know, .NET Remoting has some limits, one of them is that server can't send event to internet clients across NAT/firewall.
This is an evidence: http://social.msdn.microsoft.com/forums/en-US/netfxremoting/thread/6a91626a-3c44-45a1-b0f8-dbf4042f51e4/
And today, I have a plan to improve .NET Remoting so that server...
I am using ASP MVC to develop a new project. I am using the repository pattern for Data Access. I have worked on the same scenario before using SQL Server, but now I'm using MySQL.
How do I interact with MySQL using the repository pattern?
...
I am trying to Update/Edit Properties of Uploaded Document on Sharepoint 2007.
My code:
Lists listService = new Lists();
listService.PreAuthenticate = true;
listService.Credentials = new NetworkCredential(username,password);
listService.Url = "http://myserver/SiteName/_vti_bin/lists.asmx";
string strBatch =
"<...
i want to convert this string into DateTime.
Tue Aug 19 15:05:05 +0000 2008
I have tried the following code, but not getting the proper value.
string strDate = "Tue Aug 19 15:05:05 +0000 2008";
DateTime date;
DateTime.Parse(strDate,out date);
...
Let's have an example:
using (var someObject = new SomeObject())
{
var someOtherObject = new SomeOtherObject();
someOtherObject.someMethod();
}
SomeOtherObject also implements IDisposable.
Will be SomeOtherObject also disposed when SomeObject get disposed ? What will happen to the SomeOtherObject ?
(disposing of SomeOtherOb...
Hi,
I am trying to figure out an eazy way to load CSV file into SQLite DB using System.Data.SQLite
I saw commandline way to do that i.e .Import mydata.csv mytable
But I need to do this via C# code. Any Idea?
...
Hello everybody
In a scientific application I'm writing (vb.net) I use a huge collection of object stored in a tree structure. Every object exposes a LastAccessed property (datetime) that stores the last time the node was accessed by the algorithm.
I need to find a fast way to find the N least accessed objects in the structure.
I'm us...
What is the optimal approach to a WithEvents Collection - VB.NET?
Have you any remarks on the code bellow (skipping the Nothing verifications)?
The problem is when I obtain the LinkedListNode(Of Foo) in a For Each block I can set
myNode.Value = something, and here is a handlers leak...
-Could I override the FooCollection's GetEnumera...
We have some objects that have an associated workflow instance. The objects are identified with a GUID, which is also the GUID of the workflow instance associated with the object. We need to restart (see NOTE 3 for the meaning of 'restart') the workflow instance if the workflow definition changed (there is no state in the workflow itself...
Am using following code to deserialize an object,
using (MemoryStream memoryStream = new MemoryStream())
{
try
{
XmlWriterSettings writerSettings1 = new XmlWriterSettings();
writerSettings1.CloseOutput = false;
writerSettings1.Encoding = System.Text...