all groups > c# > march 2007
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 31
Thoughts on how to get this dynamic variable name workaround to work?
Posted by Mark S. at 3/31/2007 9:21:33 PM
As I understand it, C# doesn't offer dynamic variable names. Below is my
attempted workaround. Is what I'm doing possible?
FYI, I already read all the "why in the world do you need dynamic variabale
names" comments by other posters, if you are kind enough to post a reply
please either say i... more >>
What is the use of using an AS clause in a SQL query?
Posted by weird0 at 3/31/2007 7:51:44 PM
What is the use of using an AS clause in a SQL query something like:
SELECT accno AS AccountNumber from Accounts
What difference does it make when i use the ExecuteScalar() function
and store it in a variable of the name of my own choice..... like:
string AccountName=cmd.ExecuteScalar();... more >>
Cross process signalling - best way of doing it?
Posted by Clive Smith at 3/31/2007 7:16:23 PM
Hi Folks,
I am developing an application consisting of a webservice and a Win32
service both written in C#.
When the webservice is called it writes a number of records away to a SQL
server database. These records require further processing by the Win32
service as soon as they appear in t... more >>
Which of the following elements can an interface NOT contain?
Posted by Monica at 3/31/2007 7:14:04 PM
Hi,
Which of the following elements can an interface NOT contain?
Constants, Constructors, Static Members or all of them?
Thanks,
Monica
... more >>
Please Help - Access Current Row in table adapter
Posted by Troy Bull at 3/31/2007 2:56:46 PM
Greetings
I am new to C# coming from Java / EJB. I have been messing around and
in an app i am working on I am trying to get access to the fields of the
current row in a table adapeter (current row from binding source).
Here it the code I found that works, is there a better way??
code ... more >>
WCF Retrieving Metadata Issue
Posted by Junoti at 3/31/2007 2:43:00 PM
Hello,
I've done some research prior to posting this, but I can't seem to
resolve an issue when I try to add a Service Reference to my
application. I can successfully add a reference for the "GoalService",
but nothing I try allows me to add one for the ComboService. Is there
something I'm mis... more >>
What are the essential Web Application files?
Posted by Monica at 3/31/2007 12:34:01 PM
Hi,
An ASP.NET Web application was created in C# and you want to deploy it to a
host server on the Internet. The application was configured with code-behind
pages which are compiled in the build process. What are the essential Web
Application files you should deploy to the host?
A: Cop... more >>
How should you package the custom control?
Posted by Monica at 3/31/2007 12:04:03 PM
Hi,
Does someone know the answer?
You are building a setup for your application. The application contains a
custom control developed by you, which will be shared across multiple
applications. How should you package the custom control?
A: Package the control in a Merge Module (.msm) and... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
adding key/value to Exception.Data & avoiding key conflicts
Posted by Zytan at 3/31/2007 11:38:29 AM
http://msdn2.microsoft.com/en-us/library/system.exception.data(VS.80).aspx
says:
"Avoid key conflicts by adopting a naming convention to generate
unique keys for key/value pairs. ... two applications, named Products
and Suppliers, each has a method named Sales. The Sales method in the
Product... more >>
The opposite of page scraping - what's it called
Posted by ssg31415926 at 3/31/2007 9:16:50 AM
I'm familiar with the idea of page-scraping - getting data from
websites where there's no nice feed to use.
Is there a name for the opposite i.e. when your program simulates a
human inputting data to a site? I need to do this and I don't know
what to search for. So far, my searches have been... more >>
Sockets recieving data
Posted by bbdobuddy at 3/31/2007 9:06:00 AM
Hi,
I have a question that hopefully someone can help me out with. I am trying
to use fop to create a pdf report. I have the fop code created but I can't
figure out how to recieve data.
The data is located here http://localhost:8080/fop/fop?fo=?PATHTOAFILE
Any help would be apprecia... more >>
Call an event from the base class
Posted by kenny.deneef NO[at]SPAM gmail.com at 3/31/2007 8:22:21 AM
Hey all
We are working on a project and have alot of forms with textboxes on.
Now we want to put some input validation keypress events on those
textboxes. We got a parent class where we putted some event into ex.
public void AlfaKeyPress(object sender, KeyPressEventArgs e)
{
// still ha... more >>
Threaded TCP socket program incorrectly reporting establishment of connection
Posted by shofu_au NO[at]SPAM yahoo.com.au at 3/31/2007 3:44:03 AM
Hi Group,
A question about threads and asynchronous TCP sockets. In the
attached code, even if the host TCP server is not running my code
reports that the connection has been established.
With the Server NOT listening I get (Even actually the system powered
off)
connectHost Started
co... more >>
RegEx and filenames
Posted by Jeff Williams at 3/31/2007 12:00:00 AM
I have a list of file names I need to parse and check if they match a
valid expression.
I want this to work like you were listing a directory.
ie
*.doc dhows all doc
*.* shows all documents
*doc shows all those ending with doc
?abc.doc would show documents aabc.doc, babc.doc etc
etc... more >>
What does M mean just after a number?
Posted by tundra999 NO[at]SPAM yahoo.com at 3/30/2007 9:35:36 PM
Such as this:
return base.CalculatePrice() * 0.9M;
What data type does the 'M' stand for? I can't find a listing of these
shorthand notations anywhere.
Thanks,
Tom
... more >>
dialog's Form.FormClosed is not run
Posted by Zytan at 3/30/2007 6:17:22 PM
I have created a new form from the main form. When I close the main
form with the 'x' close button, its Form.FormClosed event is run, but
not the dialog's.
Is this normal? It is ok / dangerous? How can I force shutdown code
within the dialog's Form.FormClosed event run?
Zytan
... more >>
Accelerator key not working
Posted by B. at 3/30/2007 6:07:31 PM
I have a C# winform with accelerator key associated with some menus.
If my exe is in unmanaged C++ and the winform is invoked through
interop, the accelerator key not working. If I create a new C#.Net
project and the same winform is invoked in the C#.Net project, the
accelerator key works perfec... more >>
SQL or C# for searching one table based on another table's data?
Posted by Ronald S. Cook at 3/30/2007 6:06:35 PM
I have a table of keywords (hundreds/thousands of records):
KeywordID KeywordName
--------- -----------
1 Apple
2 Orange
3 Pear
I then have a table of products (also hundreds/thousands of records):
ProductID ProductName ProductDescription
-------... more >>
[Q] Threads or events - How to?
Posted by stuie_norris NO[at]SPAM yahoo.com.au at 3/30/2007 5:12:33 PM
Hi Readers,
I am trying to understand threading and or evetns with C#.
So I have set myself up a learning challenge.
I wish to develop and application that reads information
asynchronously using TCP sockets and uses a seperate
thread to process data once it has arrived. This second threa... more >>
Value from UserControl rounded
Posted by RvGrah at 3/30/2007 4:18:00 PM
I have a usercontrol written in C# that exposes a public property of
type double. This control is used in a program written in VB.net.
If I set the value to 66.6667, it stays fine, I can break into the
usercontrol code at various events that can change the values and it's
still 66.6667.
How... more >>
Is adding information to Exception.Data frowned upon?
Posted by Zytan at 3/30/2007 2:11:09 PM
I have a function that accepts an Exception, and writes out all of its
information to a log. This function is called in many places where an
exception is caught. In some places, I'd like to add one more bit of
information to the log. I could just write it out to the log there,
or, I could add... more >>
Reflection
Posted by Jason at 3/30/2007 1:56:14 PM
Hello
I'm still what you'd consider to be a newbie to c# Can anyone provide an
explanation to reflection, when, why it's used, and benefits or show an
example.
Thanks
... more >>
Where to hook/unhook events with Forms/Controls
Posted by JS at 3/30/2007 1:52:56 PM
I have an application with many user controls and forms which display
measurements in whatever the current unit system is. The current unit
system is kept in my 'Units' static class as Units.CurrentSystem. I
also have an event in the Units class called
Units.CurrentSystemChanged. My controls ... more >>
Problems with postgresql connection
Posted by halex2000 at 3/30/2007 1:43:14 PM
Hi, I'm trying to connect to a Postgres DB from a c# app, but this is the
first time with ODBC and am experimenting some troubles. First of all, do I
need to manually execute the drivers, or do they start with the server (the
file I downloaded and installed is the latest installer package)?
I... more >>
What's the best Timer to use
Posted by DaTurk at 3/30/2007 1:21:33 PM
Hi,
I'm creating an application that will need to use a timer to do a
static method call every second. My question, is what would be the
best timer to use? I know there are several, but I'd like to use a
timer that is probably the most reliable, and hopefully designed with
high performance ... more >>
Creating an object from a wsdl definition?
Posted by sean.j.gage NO[at]SPAM gmail.com at 3/30/2007 1:14:12 PM
Is there a way to get to a Type definition from a wsdl through c#
during runtime? I'd like to load and process the wsdl into its various
objects at run time and be able to use a factory to return the
appropriate type when that object is returned from a third party web
service. Ultimatly the clie... more >>
Ienumberable<T> / Event Handler design question...
Posted by Jamie Risk at 3/30/2007 12:47:18 PM
As an example supposing I have an object:
public class myClass
{
public List<byte[]> listOfBytes;
public int X;
public int Y;
}
and a method ("op()") whose signature is:
public delegate void ByteOp(byte[] b, int x, int y);
How would I go about creating a... more >>
My UnhandledExceptionHandler Won't Fire
Posted by victorcamp at 3/30/2007 12:33:05 PM
I'm new to Visual Studior C# .Net 2003 on Vista, and have been uable to get
my UnhandledExceptionHandler() to fire.
I have added these lines to Main() before the Application.Run():
AppDomain adCurrent = AppDomain.CurrentDomain;
adCurrent.UnhandledException += new
UnhandledExceptionEve... more >>
Printing in C#
Posted by Gaurav at 3/30/2007 11:56:01 AM
Hello... I am trying to print a .pdf file using my C# application using:
Process myProcess = new Process();
myProcess.StartInfo.FileName = "c:\\Document.pdf";
myProcess.StartInfo.Verb = "Print";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Star... more >>
CurrentDomain.UnhandledException doesn't catch Exceptions from other Threads?
Posted by james at 3/30/2007 10:53:36 AM
Hi all,
I have a console app that uses
AppDomain.CurrentDomain.UnhandledException. However it only seems to
catch exceptions in the current thread. Exceptions in other threads
(like from a timer) don't seem to get reported at all (and my
application keeps running). How do I catch unhandled... more >>
How to read html files AS IS. Encoding seems to change the characters.
Posted by Zoro at 3/30/2007 10:43:07 AM
My task is to read html files from disk and save them onto SQL Server
database field. I have created an nvarchar(max) field to hold them.
The problem is that some characters, particularly html entities, and
French/German special characters are lost and/or replaced by a
question mark.
This is re... more >>
Public delegate & event not seen in parent instantiation
Posted by Mike McAllister at 3/30/2007 10:00:01 AM
I have a partial class of a UserControl coded as follows:
public partial class Login : System.Windows.Controls.UserControl
{
public delegate void StartingLoginHandler(string message);
public event StartingLoginHandler StartingLogin;
public Login()
{
... more >>
Compiler complains about type constraint in generic class
Posted by Whitney Kew at 3/30/2007 9:54:01 AM
Hi there,
I have the following class hierarchy that isn't compiling correctly, and I
don't understand why:
public abstract class A<T> where T : System.IComparable<T> { }
public abstract class B : System.IComparable<B>
{
public abstract int CompareTo(B other);
}
public abstract class ... more >>
Automatically generating get and set properites for private class data
Posted by Charles at 3/30/2007 8:37:35 AM
How often have you seen this kind a of construct in a .NET class:
class A
{
private string b;
public string B
{
get { return b; }
set { b = value; }
}
}
Wouldn't it be nice to have an attribute you could place on the member
data that would automatically generat... more >>
Doubts in Design Level. Desktop ->Web-Based in .NET TECH.
Posted by John at 3/30/2007 8:14:03 AM
Hi all,
We have one product. It is client/server based application. We
have developed client application in VC++ 6.0. Our client is desktop based
application like dialog based application. Client application will connect to
server according to user requests. This is current scen... more >>
PrintPreviewControl navigate pages problem.
Posted by Chris Dunaway at 3/30/2007 7:11:16 AM
I am using the PrintPreviewControl on a custom form to display a
report. The report is multiple pages. I have a NumericUpDown control
on the form to navigate the pages of the report. In the ValueChanged
event of the UpDown control I change the StartPage property like this:
private v... more >>
DateTime question!
Posted by DBC User at 3/30/2007 6:25:22 AM
Is it possible to check a datetime value as in which culture format?
My program is written for international customers. I have a function
which converts the date and time to en-US format and is working. But I
want to check before converting to see if the date and time is already
in en-US format?... more >>
Is there anyway to get the row number?
Posted by chance at 3/30/2007 6:18:26 AM
I have this code:
DataRow row = docAttachTable.NewRow();
docAttachTable.Rows.Add(row);
What I want to know is the primary key number (it's auto-generated).
Is there anyway to do that?
thanks in advance,
chance.
... more >>
Debug vs Release
Posted by Grigs at 3/30/2007 5:40:01 AM
Hello,
After getting some posts on forums.microsoft.com but no solution I was asked
to post over here. Hopefully someone here can help with my problem.
I have a Windows Forms application written in C# via VS 2003. It does 100%
of what it should while in Debug mode (running in the debugge... more >>
External listview control memory exception when sendmessage is cal
Posted by Irfan at 3/30/2007 4:44:04 AM
Hello,
It may be a repeated question but I don't find the solution to the situation
that I encounter in it.
My application is monitoring another application that is built in VB6. The
application monitors all the textboxes and other input & display controls on
that application.
The data fr... more >>
reading a C++ structure from a binary file using C#
Posted by Nand Kishore Gupta at 3/30/2007 4:06:00 AM
I have a binary file created using C++ that contains an object of the
structure:
struct student
{
int roll_no;
char name[20];
char qualification[50];
};
the following code is used to create and write to the file:
void WriteToFile()
{
student s;
s.roll_no=1;
... more >>
iterating and comparing rows
Posted by Shum at 3/30/2007 3:25:59 AM
Hi!
i am working on a hospital data base. i have two tables Administration
and knowlege base.
in Administration i have columns ID, NumberOfDoctors etc, and in
KnowlegeBase i have some similar columns but ofcourse differnet data.
Administration
ID Date HospitalName
... more >>
ADO.net question
Posted by Matt at 3/30/2007 2:44:52 AM
Hi,
I have an xsd which contains two tables, for the sake of this example
I'll call them Person and Salutation. Person contains personal
details, plus a key reference to the salutation table which contains
salutations i.e. Mr Ms Mrs etc.
So, I have filled the two tables in the xsd and would... more >>
Transactionoption
Posted by Manikandan at 3/30/2007 2:02:00 AM
Hi,
I'm new to web services using XML.
I'm developing application using c#.
Could anybody explain me the difference between
[WebMethod(TransactionOption=TransactionOption.RequiresNew)]
[WebMethod(TransactionOption=TransactionOption.Required)].
I'm unable to understand the difference between
... more >>
opening multiple files with the win shell context menu?
Posted by giddy at 3/30/2007 1:48:40 AM
Hi ,
I've read this a long time ago , read it again:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/context.asp
I know how to make file associations and then add an option to the
shell context menu ... more >>
Using 2 Mediaplayer COM objects with multiple audio cards.
Posted by Sagaert Johan at 3/30/2007 1:13:42 AM
Hi
I have 2 audio cards and want my first mediaplayer object to play through
soundcard 1 and the other object on card 2.
I can't find any properties to set, so i fear this will not be possible.
Any hints or workarounds ?
J.
... more >>
WebBrowser - changing HTML content after DocumentCompleted event
Posted by Robson Siqueira at 3/30/2007 12:49:38 AM
Folks,
I am facing a problem. I am trying to manipulate the HTML data (thru the
Document and DocumentText properties) of the WebBrowser object
(System.Windows.Forms).
The problem is that the application enters in a loop state and my changes
don't apply.
Have somebody faced the same pr... more >>
Why is there no contains/exists in SerializationInfo?
Posted by KWienhold at 3/30/2007 12:31:44 AM
I have been working with serialization in some places for a while and
have now begun to run into version issues.
Unfortunately my company is still working with .Net 1.1, so using the
VTS of 2.0 was not an option.
So I decided to have my classes implement ISerializable and wrote a
set of functio... more >>
How to search for a keyword in a StringBuilder?
Posted by Laser Lu at 3/30/2007 12:00:00 AM
Sometimes, I need to do some time-consuming operations based on whether a
specific keyword was contained in a lengthy string. Then, for a better
performance, I wrapped that lengthy string into a StringBuilder.
But after doing that, it seems there's no proper methods defined in
StringBuilder f... more >>
databinding
Posted by freak at 3/30/2007 12:00:00 AM
in .net 3.0
i have created bindingsource, dataset and tableadapters in code.
how can i bind specific column from specific table to listbox.... more >>
|