all groups > c# > june 2007 > threads for monday june 11
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Transform XML
Posted by Gina_Marano at 6/11/2007 11:28:36 PM
Hey All,
I have a string that contains XML content and I want to transform it
in new XML content string.
What is the best way of doing this?
private string DoXSLTransform(string aXSLFileName, string
sOrigXMLContent)
{
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Loa... more >>
Question about Iteration and forEach
Posted by news.microsoft.com at 6/11/2007 10:50:40 PM
I am looping through an iteration and I would like to test the next item but
if its not the one that I want how do I put it back so that when my foreach
continues it is in the next iteration?
Bill
... more >>
User objects in application settings?
Posted by Grant Schenck at 6/11/2007 8:47:11 PM
This seems like is should be straight forward but I'm just not getting it.
I have a very simple class (see below) which I think should be XML
serializable. I have this class defined in my simple form app's namespace.
Now I want to add an instance of this class to my Application Settings. So... more >>
Send an email from a Web Service without having an SMTP server.
Posted by BLUE at 6/11/2007 8:05:54 PM
I want to send an email from my web service.
I do not want to act like an email client, giving credentials of an existing
email account to send messages: I would like to send my mail directly to an
SMTP server like if I am myself an SMTP server that is forwarding a mail.
What classes can b... more >>
How to pass args command line parameter from Program.cs to Form1.cs ?
Posted by mstev NO[at]SPAM ozone.com at 6/11/2007 7:52:56 PM
For a GUI CSharp program I could define command line parameter as well
by declaring them in Main():
static void Main(string[] args)
But how do I pass them easily to Form1 ?
Or should I declare them in Program.cs and access them from Form1.cs ?
Pia
... more >>
using c++ developed dll in .net
Posted by YIguchi at 6/11/2007 7:17:00 PM
Hi All,
i wanted to know how can i use c++ developed in my c# code.
I want to use crypto++ library in my c# code. Any pointer would be helpful.
Regards,
Y Iguchi... more >>
Query on data from diffrent OleDBConnections
Posted by Sagaert Johan at 6/11/2007 6:55:24 PM
Hi
Is it possible to run an inner join query if the tables reside in 2 diffrent
mdb files, and so i have 2 connection strings ?
mdbfile1 contains the first table
mdbfile2 contains the secpnd able used in the join.
I'm stuck ,all i can do is to move my second table into the first database.... more >>
Getting the properties of a DirectoryEntry (local user) in c# when the user is a domain account? Active Directory
Posted by Michael Howes at 6/11/2007 6:28:04 PM
I'm writing a utility to manage a machines *local* accounts in c#
I am getting all the users in a specific Group just fine but when I
want to get some of the information on each user from their Properties
collection I can't get the properties on some users.
For example, I get all t... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
c# lock
Posted by Nalaka at 6/11/2007 5:31:59 PM
Hi,
in C#... I have a method that need to be executed by only one thread at a
time.
And I want the the following threads to return without entering the blocked
code section.
( if some other thread is already doing the work, I do not have to do the
work)
Something like this....
if ... more >>
Multiline RichTextBox flashes as backspacing occurs
Posted by Ray Mitchell at 6/11/2007 4:02:02 PM
Hello,
I've asked about this kind of thing before but I'm still having problems
with it. Below is a stripped down version of my code to do a backspace in a
multiline RichTextBox. I know it still needs some work to make it work for
all cases but my question is more basic so I think you can... more >>
Paint Event Starvation During Long Computations
Posted by Gary Brown at 6/11/2007 3:52:31 PM
Hi,
I have a computation intensive application that tries to
update the display quite often. After a few seconds the
window stops updating and the window goes blank. A
breakpoint in the Paint event doesn't trigger.
Further, if another window obscures the display while it
is still working... more >>
How to execute an INSERT and UPDATE SQL commands from inside a CSharp program
Posted by robm NO[at]SPAM lucent.com at 6/11/2007 3:20:44 PM
How do I have to code the execution of such an INSERT or UPDATE SQL statement ?
Given the follwoing code:
command = connection.CreateCommand();
command.CommandText = "INSERT ....";
A SELECT statement would continue with:
OracleDataReader rdr;
rdr = commnad.ExecuteReader();
But thi... more >>
Getting the fraction off of a double
Posted by DaTurk at 6/11/2007 3:17:39 PM
Very stupid question, but is there a simple method that will get me
the fraction off of a double?
... more >>
API Call
Posted by Mex at 6/11/2007 3:05:21 PM
Hi
How to call following API in C#?
LONG SCardListReaders(
SCARDCONTEXT hContext,
LPCTSTR mszGroups,
LPTSTR mszReaders,
LPDWORD pcchReaders
);
[DllImport("winscard.dll", SetLastError = true)]static extern int
SCardListReadersA(int SCARDCONTEXT,string
mszGroups,[MarshalAs(Un... more >>
String array (String[]) being seen as System.Array
Posted by iwdu15 at 6/11/2007 3:01:00 PM
hi, im having a small issue. I pass a String[] object to a method, but then
when i try to use the Split method of a String array, it says System.Array
does not contain Split. The parameter of my method is a String array, so it
should be able to find the Split method. before i moved it into a n... more >>
How to open XmlReader from string?
Posted by Katit at 6/11/2007 2:42:31 PM
I have string with XML, need to read it using XmlReader. I don't see
any way to feed string variable in there.
How it's done?
Thanks!
... more >>
concurrency exception
Posted by Hendri Adriaens at 6/11/2007 1:50:50 PM
Hi,
I try to run this:
OdbcDataAdapter odbcDA = new OdbcDataAdapter("select * from job_1",
odbcCon);
DataTable dataTable = new DataTable();
odbcDA.Fill(dataTable);
dataTable.Rows[0].BeginEdit();
dataTable.Rows[0]["E1"] = 0.9919919;
dataTable.Rows[0].EndEdit();
odbcDA.Update(dataTable);... more >>
XML Comments unavailable to consuming application
Posted by John Kraft at 6/11/2007 1:40:53 PM
I have a project that is referencing a dll I compiled. The classes in
the dll are all fully XML commented. However, when I use classes
contained in the dll in my project, I receive none of the XML
documentation in my intellisense. Has anyone else experienced this
and have any advice as to how... more >>
using SMO to create a database, and choose location!
Posted by Rogelio at 6/11/2007 12:53:00 PM
hey, I'm using SMO to create a databas.e easy stuff
ServerConnection srvcon = new
ServerConnection("MYCOMPUTER");
Server serv = new Server(srvcon);
Database db = new Database(serv, "MyDatabase");
db.Create()... more >>
Deploying a WinForms app on Vista
Posted by David Jackson at 6/11/2007 12:41:14 PM
Hello,
I'm looking for some best practice advice on deploying a 32-bit WinForms app
on 32-bit Vista as regards file locations.
The app will be written in Visual Studio.NET 2005 and will be compiled into
a single executable with some values stored in the app.config file - the
user needs t... more >>
calling oracle stored proc from .net
Posted by Vinki at 6/11/2007 12:29:00 PM
Hello Everyone,
I am trying to call a oracle stored proc from .net code and I am getting
an error
PLS-00306: wrong number or types of arguments in call to KSSP_MEMBER_NEW. I
counted all the number of parameters that I am passing and they seem to be
ok, but type can be the problem. In or... more >>
datagridview - how to retrieve data help...
Posted by trint at 6/11/2007 12:25:11 PM
How can I retrieve all of the data from a datagridview?
Any help is appreciated.
Thanks,
Trint
... more >>
CLR Exception / Unhandled Exception
Posted by amyl NO[at]SPAM paxemail.com at 6/11/2007 12:10:15 PM
I have an application whose main function is encapsulated in encased
in a try/catch block catching Exception. My application has crashed
on several occasions with a CLR exception.
CLR exception - code e0434f4d (!!! second chance !!!)
So far I have been unable to create a test case that repr... more >>
Shortes way to copy an complete array and to get the length ?
Posted by mstev NO[at]SPAM ozone.com at 6/11/2007 11:57:15 AM
I have 2 arrays
string[] arr1;
string[] arr2;
Ok there are two way to copy arr1 into arr2:
With Array.Copy()
and
foreach ....
But it seems to me that there is a shorter way when I want to copy the complete array rather
then a subarray.
Could I write simply
arr2 = arr1;
... more >>
How to GetDecimal from database by ColumnName (NOT: by column number) ?
Posted by m.poppers NO[at]SPAM lycos.com at 6/11/2007 11:33:37 AM
Normally I retrieve an (e.g. DECIMAL) value from a database record by enumerating
the column number like:
Decimal localvar = reader.GetDecimal(3);
Which means "Get the decimal value from the 3rd column in the database record".
However is there a way to tell CSharp to retrieve the Decimal ... more >>
Reference Needed for "ASP"
Posted by Michael D. Ober at 6/11/2007 11:10:45 AM
What reference am I missing in the following code:
public static CheckKey Parse(TextBox BankRouting, TextBox Account, TextBox
Amount, TextBox CheckNum, ASP.controls_dateselector_ascx PaymentDate, Label
CheckName)
The error on Publish is
The type or namespace name 'controls_dateSelector_as... more >>
how to convert regexoptions value to chekcboxes
Posted by GS at 6/11/2007 9:41:02 AM
I tried converting regexoptions to bits sp I can do bitwise operation but I
just could not get it going. I tried Google, so far I failed to find the
answer.
any hint?
what is happening, is that I retrieved the regexoptions value from database
stored as int and I am trying to represent that... more >>
abstract class 'does not implement interface member ...'
Posted by Ben Voigt [C++ MVP] at 6/11/2007 9:32:40 AM
I get
C:\Programming\LTM\devtools\UselessJunkForDissassembly\Class1.cs(360,27):
error CS0535: 'UselessJunkForDissassembly.InvocableInternals' does not
implement interface member
'UselessJunkForDissassembly.IInvocableInternals.OperationValidate(string)'
C:\Programming\LTM\devtools\UselessJunk... more >>
controlling aspect ratio - same as Java on a form resize? (not im
Posted by Rich at 6/11/2007 9:28:06 AM
Hello,
If I create a form in Java with controls like Panels, textboxes... when I
stretch/shrink the form, all the controls can grow/shrink - along with the
text contained in the textboxes. This is convenient for resizing a form for
different screen resolutions.
I can't see how to do t... more >>
Model Dialog box causes another application to get focus
Posted by GraffixNYC NO[at]SPAM gmail.com at 6/11/2007 9:18:25 AM
We have a model dialog box(well a bunch of them) and it seems that
when you cancel one of the in our application it will activate and
bring the focus to another open window (not in our application) anyone
know why this is and how to correct it? it should set the focus to
our application and not... more >>
Replacing a line in a multiline RichTextBox
Posted by Ray Mitchell at 6/11/2007 9:06:03 AM
I have a RichTextBox (rtfTerminal below) in which I would like to replace the
last line with the last line minus its last character (i.e., do a backspace).
I tried the following code, wherein I first get a substring representing the
last line minus the last character, then rewrite it back ove... more >>
display something in textBox of my form
Posted by Claudia Fong at 6/11/2007 8:57:50 AM
Hi,
In my form I have a textbox.
I have a class where I have a method to add two number.
Can I define in the method of my class to display the result in the
textbox of my form?
I the method is define insidemy form I know how to do it...
public int AddIntegers(int x, int y)
... more >>
problem in updating DB using console application
Posted by Claudia Fong at 6/11/2007 7:33:42 AM
Hi,
I'm using console application to connect to a db and I managed to use
the SELECT statement to display records in my DB but I also need to
UPDATE some fields in my table but after I run the code below, it didn't
update the record..
Can someone tell me?
Cheers
Claudi ... more >>
Newbie: API function call with array pointer as argument
Posted by zhilko NO[at]SPAM ufacom.ru at 6/11/2007 5:43:16 AM
Hi,
I'm from C/C++ world and now having troubles converting my old C++
code to C#
The OpenGL function is declared as
void glMultMatrixd( const GLdouble *m );
In C++, I use the code
//-------------------class definition
class CMatrix
{
public: double xx, yx, zx, x0;
double xy, yy, zy... more >>
finding out "Process ID" via cmd Console
Posted by Christoph at 6/11/2007 1:35:43 AM
I have a cmd file (batch file) which starts an exe after setting
parameters. I need to find out the Process ID of the exe via a
command. The problem is that my program, written in C# only knows the
PID of the cmd file. I don't want to use a method like
GetAllProcesses(). If I want to kill the pr... more >>
How to implement cache in WinForms application
Posted by Andrus at 6/11/2007 12:00:00 AM
I'm creating C# WinForms client-server database application.
This application reads data from PostgreSQL server using npgsql Dataadapter
and DataReader classes and stores data mostly in Datasets and sometimes in
business object properties.
A lot of lookup tables (payment terms, currency li... more >>
Can I download/re-install MS built-in Oracle data provider for VisualStudio ?
Posted by peterhann NO[at]SPAM hotmail.com at 6/11/2007 12:00:00 AM
As far as I know VisualStudio contains a MS built-in data provider for accessing
Oracle databases.
Is this built-in MS data provider only in the "full" VisualStudio Edition or in the Express
edition as well ?
Can I download this built-in MS Data Provider for Oracle databases separately and/o... more >>
navigate to correct XML node ??
Posted by at 6/11/2007 12:00:00 AM
<root>
<person>
<name>bob</name>
<age>30</age>
</person>
<person>
<name>bill</name>
</person>
</root>
I'd like to navigate to the LAST "person" node and insert an "age"
element.
if I use*:
XmlNode insertNode = xmlDoc.SelectSingleNode("/root/per... more >>
this cf sender in event handlers
Posted by Gary Stephenson at 6/11/2007 12:00:00 AM
Can someone please explain why the assertion in the following code fails?
Could the assertion be made to succeed somehow?
// code begins
class MyButton : Button
{
public MyButton()
{
Click += HandleClick ;
}
public void HandleClick( object sender, EventArgs e... more >>
log4net implimentation in a DLL ..???
Posted by at 6/11/2007 12:00:00 AM
HI All,
Here is my problem:
log4net works fine with my Client (Windows Application .Net 1.1)
but does not log any thing when i use it in my server (Com+ DLLs).
Does any one know why or how to make it work.
Thanks in Advance
Harish
... more >>
Sending email using smtpclient class
Posted by Jeff Williams at 6/11/2007 12:00:00 AM
I can send emails using the smtpclient class but I would like to do the
following:
1. Send the emails to a bulk lot of clients and use no To address only a
BCC address
2. use the To or Cc to send many email addresses.
How can I do the above. A small code sample would be appreciated.
... more >>
MDI Applications and Forms
Posted by Jeff Williams at 6/11/2007 12:00:00 AM
I have a MDI application and if I open a Window(Form) form the Menu bar
it is held in the constraints of the application window.
What I have on this form is a list view which opens another form. This
form is on the top of my app and can be moved outside of the constraints
of the application... more >>
|