all groups > c# > march 2006 > threads for thursday march 16
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
Best practice for n-tier data access in .NET 2.0 .
Posted by Paul Aspinall at 3/16/2006 11:41:13 PM
Hi
I've previously constucted my .NET 1.1 data access, via a Data Access Layer
(DAL), that was all in code.
Now that I have access to the DataSet control in .NET 2.0, I'm looking for
opinions or pointers into how to implement a DAL under .NET 2.0. Is it best
to use controls or code?? Are ther... more >>
STL and DLL linkage (VC71/ VS2003) - Warning C4251
Posted by Bart Simpson at 3/16/2006 11:17:03 PM
I am writing a shared object (Dll in Windows) and I am making extensive
use of the STL.
I am getting lots of warnings like this:
ClassA.h(139): warning C4251: 'ClassA::indexarray' : class
'std::vector<_Ty>' needs to have dll-interface to be used by clients of
class 'ClassA'
wit... more >>
Error while running asp.net
Posted by sha2kk3 NO[at]SPAM gmail.com at 3/16/2006 10:57:43 PM
While running this code "Invalid token 'try' in class, struct, or
interface member declaration" error is comming. Please advice me......
I am new to asp.net.
try
{
string connString = "Server=server04;Database=Northwind;Integrated
Security=SSPI";
string sql = "SELECT * FROM EmployeeD... more >>
Trouble getting the date time format I need
Posted by MJ at 3/16/2006 10:46:04 PM
I need to get some data into "perfmon" format. I'm using DateTime.Now().
How do I convert
"3/16/2006 10:43:29 PM"
to
"03/16/2006 22:43:239.123"
Thanks in advance!
-mj
... more >>
can help me with message box in C#.net
Posted by yefei at 3/16/2006 10:42:17 PM
i want to display a message box when the user click the submit buttone,
but some fields are not filled(those fields are which can not be
validated using available validators)
i know in C#.net, the asp doesnot support messagebox class
and I also cannot add the System.Windows.Forms namespace
can ... more >>
Best practice for n-tier data access in .NET 2.0
Posted by Paul Aspinall at 3/16/2006 10:42:13 PM
Hi
I've previously constucted my .NET 1.1 data access, via a Data Access Layer
(DAL), that was all in code.
Now that I have access to the DataSet control in .NET 2.0, I'm looking for
opinions or pointers into how to implement a DAL under .NET 2.0. Is it best
to use controls or code?? Are t... more >>
How to cast in c# (Just kidding). But I do have a non-trival casting question.
Posted by the.duckman NO[at]SPAM gmail.com at 3/16/2006 10:19:57 PM
G'Day.
Anybodey got an idea on this problem.
Say I have a function object doCast(object obj, Type t);
It's job is to cast the obect (obj) to a new type (t) and return it.
Sounds so simple, but I cant seem to find a way to do it without some
prety extravigant hacks.
Can anybodey think... more >>
real & transparent proxy
Posted by Sharon at 3/16/2006 10:19:35 PM
Hi all,
Can any one explain the relationship between real & transparent proxy?
I couldn't fully understand it from the explanation at MSDN.
Thanks,
Sharon.
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to prepare setup file to a C# application
Posted by Kondapanaidu at 3/16/2006 9:39:19 PM
Hi,
I am using .NET 1.1 with professional 2000.
What are the steps we have to follow to make set up to C# console
application.
My application is having one dll.
Example: Application Name is : tc200 (This is console application)
My Dll name is : installer (This is Class Library file)
A... more >>
Window SERVICE AND DISPLAY NAME
Posted by James at 3/16/2006 9:26:31 PM
Is it possible that I can have a c# window service run under different
display name?
... more >>
Copying to clipboard
Posted by Arun at 3/16/2006 9:09:21 PM
hi all,
I would like to copy the contents of a text file to clipboard using C#.
The program should do the job of Ctrl+A & Ctrl + C.
How do i go about?
Arun
... more >>
Create new drive in a System using C#
Posted by Kondapanaidu at 3/16/2006 7:35:20 PM
Hi,
I am using .NET 1.1 along with 2K Professional Operating System.
How to create a new drive in a system which is not available in my
system.
Example: My System is having the A,B,C,D,E these drives..
I need to create another drive like F which is not available.
I have the code for ... more >>
How can I play "standard system sounds" in C# ?
Posted by Steph. at 3/16/2006 6:30:07 PM
Hi !
How can I play "standard system sounds" in C# ?
( "standard system sounds" =3D The kind of sound you hear when you use =
MessageBox.Show() )
Thanks !
steph.... more >>
New form
Posted by PiotrKolodziej at 3/16/2006 6:18:04 PM
Hi.
I have a window app. After clicking a button i need to display another
window ( Options window ) in such a way that "getting back" to previous one
is blocked, unless "OK" is pressed.
How to do this?
Thanks PK
--
Pozdrawiam
Piotr Kolodziej
http://piotrkolodziej.waikru.info
... more >>
How to generate the .Net project file ".*proj" dynamically in .Net 2.0 ???
Posted by Anubhav Jain at 3/16/2006 6:06:05 PM
Hi,
I am having few .net source files(.cs or .vb) and I want to dynamically =
generate the corresponding .net project file(.csproj or .vbproj) for =
them without using visual studio.So that I could be able to generate and =
compile the project on the enviroments where Visual Studio.Net is not... more >>
Help understand type casting
Posted by keithb at 3/16/2006 5:04:26 PM
I'm trying to understand C# type casting. The following code will not
compile unless I Cast item to a String.
private static String myData;
foreach (DataRow row in MyTable.Rows)
{
foreach (Object item in row.ItemArray)
{
myData = item;
}
}
However when I use plus-equ... more >>
From ASPX page, can't access file on another PC on network
Posted by Ronald S. Cook at 3/16/2006 4:59:32 PM
In my .aspx page, I am trying to read file that is on a different on the
company network.
When I map a drive to it and call from within my .aspx page, I get this
error:
Could not find a part of the path 'Z:\Events.nss'.
Description: An unhandled exception occurred during the exe... more >>
c# + proxy + web site
Posted by Hasan O. at 3/16/2006 4:57:58 PM
Hi,
I am trying to write a program that includes a webbrowser (
System.Windows.Forms.WebBrowser ) , it works good.
I have two question about that
1 - how can i make this webbrowser to use proxy using WebProxy object or
something like this
2 - popup windows doesnt get session's , what ... more >>
ASPX code can't access mapped drive
Posted by Ronald S. Cook at 3/16/2006 4:43:01 PM
Hi,
My ASPX code is trying to read a file on a mapped drive. But I get the
error below. Any help would be greatly appreciated.
Could not find a part of the path 'Z:\Events.nss'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review... more >>
multiple clone and serialization problem
Posted by Alex D. at 3/16/2006 4:32:02 PM
hi guys.
I need to clone multiple times an object and I am succesfully cloning using
the regular serialization process, using a MemoryStream. My problem is that
after cloning the object more that 7 or 10 times then my computer's memory
gets flooded and every time I call the Clone() method the... more >>
Is it allowed to edit InitializeComponent()
Posted by tony at 3/16/2006 4:11:10 PM
Hello!
I use VS 2003.
I have a control for example System.Windows.Forms.TextBox();
I drag this System.Windows.Forms.TextBox() control into a form.
Now assume I want to add more functionality to this
System.Windows.Forms.TextBox() which mean
I want to create a subclass to this System.Window... more >>
Reference for database handling in windows forms using C#.Net
Posted by juventusaurabh at 3/16/2006 3:40:33 PM
Hello,
Can anyone please give me any referencese or links related to
database handling in windows forms using C#.Net.
... more >>
PInvoke Custom Marshaling a Value type (Boxing)
Posted by Bill Medland at 3/16/2006 3:07:40 PM
I am trying to do some P/Invoke custom marshaling and am looking for a
little help on custom marshaling a value type.
I am working based on Kate Gregory's "Arranging Custom Marshaling With
P/Invoke", which is unfortunately in C++ with managed extensions; I am
working in C#.
As with Kate's e... more >>
asp.net 2.0 control on a masterpage
Posted by Netmonster at 3/16/2006 2:59:57 PM
Hello,
Can someone please explain the load order of different .net document
types?
Situation, I have a masterpage that has a few usercontrols on it, and
an aspx page that uses the masterpage.
I have noticed that the contenPlaceHolder on the aspx page runs before
the masterpages PAGE_LOAD a... more >>
command line interface programming question
Posted by djc at 3/16/2006 2:14:59 PM
I'm new to this and was wondering what the options are for interpreting the
command line using a CLI program. Specifically methods for interpreting the
parameters passed to the program on the command line.
I noticed that visual studio adds the following for you when creating a new
CLI program:... more >>
How to add odp.net in my code?
Posted by jens Jensen at 3/16/2006 1:20:03 PM
I want to connec to oracle database via ado.net 2.0.
the statement
OracleConnection ocn = new OracleConnection();
throws an exception: The type initializer for
'System.Data.OracleClient.OracleConnection' threw a....
It seems that i need ODP.NET ,
How to move forwa... more >>
Custom business objects issue
Posted by Sean at 3/16/2006 1:08:38 PM
I have several classes that are Ienumerable and we use them to populate
datagrids and Listboxes. Now however I need the actual column (ie property
name) thus in pesdo-code
For each Property in myObject
dynamicallycreatedCheckbox.text = property.tostring
next
... more >>
C code passing a pointer to a function to a C# .Net object?
Posted by TN at 3/16/2006 12:48:32 PM
I have a bit of C code, that creates an instance of a .Net class that
has been built as a type library. Everything is working as expected, I
can pass strings to methods in the object. What I would like to also do
is pass a pointer to C function to one method to store it as a callback,
then... more >>
OT: US job market
Posted by Dan Randers at 3/16/2006 11:42:27 AM
I've been programming as a hobbyist for well over 20 years and I've finally
decided to go back to school and get certified (MCPD).
But what are my chances of finding employment? Are all the good programming
jobs going to India?
... more >>
VB6 Module in C# 2003
Posted by Mark Jerde at 3/16/2006 10:44:46 AM
This is probably a simple FAQ I missed in my reading & googling. I've been
using C# for over a year but I don't know the best way to handle a simple
class that will be called many times from many objects. The class doesn't
have to save state, it is really a simple function. IIRC VB6's "modu... more >>
The 'Interface' Type - Unique to .NET?
Posted by Jordan at 3/16/2006 10:09:51 AM
In OOP literature we read frequently about "interface" - a term which is
apparently used to mean different things depending on context and possibly
language.
..NET however provides for the Interface type - as a specific and unique type
(amongst the class, struct, enum, etc types). There is ... more >>
Nested objects and INotifyPropertyChanged
Posted by Betina at 3/16/2006 9:07:28 AM
Hi,
I've created a Person-Object which implemts INotifyPropertyChanged. This
Person-Object contains an Address-Object which implements
INotifyPropertyChanged too.
Then I create a BindingList<Person> which is the DataSource for my
BindingSource. I created some TextBoxes bound to this Bind... more >>
Serialization of a Queue
Posted by pwalessi1 NO[at]SPAM gmail.com at 3/16/2006 9:03:41 AM
Hi. I have a Queue<T> that I need to serialize, but when I try, I get
the error:
"You must implement a default accessor on
System.Collections.Generic.Queue"
It is my understanding that the default accessor has the form,
"function (int index)". But, that doesn't make any sense for a queue.
Th... more >>
how to do this mapping "const struct outputinfor ** b" using p/invoke
Posted by geri.gan NO[at]SPAM gmail.com at 3/16/2006 8:42:58 AM
I have C API just like this:
enum void getinfor(const struct inputinfor *a, const struct outputinfor
** b)
i use p/invok to translate it to
[DllImport("fmd_access.dll", CallingConvention =
CallingConvention.StdCall)]
internal static extern void getinfor(ref inputinfor a,
... more >>
How to get user under W98 without WMI
Posted by Dave at 3/16/2006 8:38:34 AM
Can anyone tell me either
a) how to find the user of a process
or, failing that
b) how to find the currently logged in user
with .NET1.1 under Windows 98 without WMI.
--
Dave... more >>
.NET installer tips needed
Posted by sklett at 3/16/2006 8:19:19 AM
I'm having a very frustrating time with the .NET installer project. I can't
make it uninstall a previous installation succsessfully. I also need to
create an uninstall icon in the program group and can't figure out how to do
that.
Do any of you know a site where I might find some tips on ... more >>
XmlDeserialization error - Input string was not in a correct format
Posted by RJN at 3/16/2006 8:01:34 AM
Hi
I'm getting an error while deserializing an xml into object.
[FormatException: Input string was not in a correct format.]
System.Number.ParseDouble(String s, NumberStyles style,
NumberFormatInfo info) +0
System.Double.Parse(String s, NumberStyles style, IFormatProvider
provider)... more >>
newbie question: Can I use odbc and connect to Firebird SQL database?
Posted by Robert Johnson at 3/16/2006 8:00:06 AM
Copying FIles Error
Posted by Jim Heavey at 3/16/2006 7:55:24 AM
I have written a little application which copies files from one location to
another location.
Before it copies the file, it ensure the directory for both the from and to
locations is valid. It also ensures that the from file exists.
All that being successful, it attempts to copy the file, b... more >>
ASP.NET 2.0 Project: How to Turn on "Allow unsafe code" mode?
Posted by Ben at 3/16/2006 7:39:28 AM
I need to use some pointer-based "unsafe" code, I'm not sure if this option
is still available. I selected "Always show solution" after I read Peter
Bromberg's tips, but I don't see the option to "Allow unsafe code" from the
project property screen.
Thanks a lot if someone with in-depth kno... more >>
TypeConverter question
Posted by Matthias Heise at 3/16/2006 7:06:31 AM
Hello everybody,
I have a problem towards the following topic.
There is a class like MyColor and a class like MyRectangle that has a
property called FillColor which is of type MyColor. Now it should be able to
say
MyRectangle rect1 = new MyRectangle();
rect1.FillColor = "Red";
Th... more >>
.NET 1.1 version of Datagrid available within VS 2005?
Posted by Greg at 3/16/2006 6:16:14 AM
Am porting a program from .net 1.1 to 2 in which I've done some pretty
painful work in order to customise a datagrid.
On installing Visual Studio 2005, I can't seem to find the old data
grid, only the new data grid view. I understand that this can be quite
slow at times, and since I am writing... more >>
reading add/remove programs? or help making distribution package
Posted by Kristopher Wragg at 3/16/2006 6:08:43 AM
hi
I'm wondering whether there is a way in C# to be able to see whether a
program has been installed or not?
I want to create a distributional executeable that will have a few
components and show which has been installed already and if it hasn't
been installed then allows them to install it... more >>
ASP.NET 2.0 : where are the project files ???
Posted by Chris Peeters at 3/16/2006 5:34:23 AM
Hi,
When creating an ASP.NET project in VS2005 : where are the project files
(.csproj, .sln, ...) ?
The only files I can find are the aspx and .code behind-files.
thanks
Chris
*** Sent via Developersdex http://www.developersdex.com ***... more >>
Folder permissions in dot 1.1 Version
Posted by Kondapanaidu at 3/16/2006 5:08:21 AM
This Library is not Importing..
ADsSecurity 2.5 Type Library
*** Sent via Developersdex http://www.developersdex.com ***... more >>
Autogenerate classes from xml schema .xsd file (not from dos prompt)
Posted by SunYour at 3/16/2006 4:51:39 AM
Hi,
Does anyone know how to generate class structures from my xml schema
from Visual Studio, not by typing "xsd /c <xmlschema.xsd>" in the
command prompt
Is the "Custom Tool" property the way to go?
I have tried to create an external tool entry and set the Custom Tool
to the name of the entr... more >>
How to get the data before IE
Posted by C# at 3/16/2006 4:43:26 AM
normally, the IE gets data from Website. then IE deal with the data and show
it to user.
now, I want to get the data before the web site transmits data to IE.
exactly, I wanna intercept data before IE show it to user.
I will deal with it , then transmit it to IE.
It will be done behind. User c... more >>
RangeValidaor throwing exception
Posted by Anup at 3/16/2006 4:25:42 AM
Hi Group,
In my application I am using "Range Validator", validator is set for a
textbox with range 1900 - 9999.
and I am also using "Validation Summary" problem is when I run the
application i get a run-time exception
Compiler Error Message: CS0234: The type or namespace name 'Global'
doe... more >>
Folder permissions in dot new 1.1 Version
Posted by Kondapanaidu Gottipati at 3/16/2006 4:03:23 AM
Hi,
How to set File or folder permissons to all users while I am creating
the File in administrator.
Once I restatt my machine I login into the normal user.
There I dont have the permissions to write a content On that file.
Need to set the permissions to all users in C#,NET 1.1 version.... more >>
Holding a class in the Session
Posted by Steven Blair at 3/16/2006 3:28:26 AM
I have the following code:
Session["CurrentUser"] = new CurrentUser("TEST");
When I postback to the server, the Session["CurrentUser"] is null.
My guess is a only the refence to my actual class is stored, rather than
the class.
Looking on the internet, one solution posted was populating... more >>
Folder permissions
Posted by Kondapanaidu Gottipati at 3/16/2006 3:28:21 AM
Hi,
How to set File or folder permissons to all users while I am creating
the File in administrator.
Once I restatt my machine I login into the normal user.
There I dont have the permissions to write a content On that file.
Need to set the permissions to all users in C#.
Any body h... more >>
How to pass a reference itself
Posted by Rich S. at 3/16/2006 3:26:27 AM
I want to pass an object to a dialog box, and have the dialog box work on the
object, so that when the dialog box closes, my program now sees the altered
object.
This turns out to be not as simple as passing a pointer in a native program.
How can I pass the object into the dialog box const... more >>
Default Path and Cursor files.
Posted by JohnSouth at 3/16/2006 3:23:47 AM
Hi
I've been setting the location of a cursor file like this:
this.Cursor= new Cursor("HandCur.cur");
I've just found out (the hard way) that if, elsewhere in the
application, the user browses for a file using the openFileDialog then
the default path is changed and the application looks f... more >>
Binding a TextBox to a particular cell of an Access database table
Posted by nvx at 3/16/2006 3:00:51 AM
Hello everyone...
Just for the record, I'm a newbie to this data binding thing... In my
C# application I need to bind a cell of an Access database table to a
multiline TextBox. How should I do it?
I've tried to bind the TextBox using the VS IDE (which ended up in
binding to a table column).... more >>
what class can seize http request in .NET framework?
Posted by C# at 3/16/2006 3:00:08 AM
hi
what class can seize http request in .NET framework or c#?
thinks!!... more >>
changing color selector in property grid
Posted by Kristopher Wragg at 3/16/2006 2:55:36 AM
I'm just wondering if there is any easy solution to change the pop-up
display that is shown when a color property is displayed in the
properties grid?
We've got a property grid in our application and we don't want
customers to be able to select System Colors from the list when
selecting a col... more >>
Is there a good reason that Decimal does not have Ceiling() method, only Math class has?
Posted by Ryan Liu at 3/16/2006 2:40:25 AM
Is there a good reason that Decimal does not have Ceiling() method, only
Math class has?
Thanks!
... more >>
pass array from managed code to COM object
Posted by Boni at 3/16/2006 2:39:43 AM
Dear all,
I have written a C++ com object:
STDMETHOD(myfunc)(INT* array)
Now I need to pass an array from c# to com. I generated a COM interop and it
the signature of the function is
myfunc(ref int)
in C# I have an array of ints.
If I call
myfunc(array[0])
and try to access... more >>
Encrypt/Decrypt serialized data
Posted by SunYour at 3/16/2006 2:13:59 AM
Does anyone have some nice code samples?
I need to put some data (confidantial data in a small "database").
I plan to use a xml schema to define the structure and
serialize/deserialize to read/store data with the XmlSerializer class.
But I need to protect the data with some kind of encryption... more >>
VisualStudio : start application directly without build ???
Posted by Chris Peeters at 3/16/2006 1:16:20 AM
Hi,
is there a way in Visual Studio.NET 2005 to start an application without
VS to first start the build-process ?
Even when the previous compile didn't result in errors or warnings, or
the source code hasn't change, he nevertheless executes the build-steps
first.
I'd like to skip the bu... more >>
Late binding with unmanaged code
Posted by Entwickler at 3/16/2006 12:42:27 AM
hello,
i have the following problem. i want to write a code that enables the user
to call functions from a unmanaged code .dll at running time . so i have to
use the late binding . i tried the following code but it doesn't walk :
Assembly assemblyInstance =
Assembly.LoadFrom(@"C:\myData\Unma... more >>
Practicla .NET2 and C#2
Posted by Patrick Smacchia at 3/16/2006 12:00:00 AM
Hi,
I've just released the book Practical .NET2 and C#2. More info is available
on the site http://www.PracticalDOT.NET
You can download sample chapters about CLR, Security, Threading/Synchro and
some C#2 features here:
http://www.practicaldot.net/en2/Sample.htm
Here is a link to some ... more >>
What about [Assembly]?
Posted by ad at 3/16/2006 12:00:00 AM
I have study a vb codes:
Dim Asm As [Assembly] = [Assembly].GetExecutingAssembly()
How can I do in C#
... more >>
how to convert a char array(byte[]) to a string variable?
Posted by David at 3/16/2006 12:00:00 AM
Hi,
how to convert a char array(byte[]) to a string variable?
byte[] buffer;
string strTest;
/*the blow codes all get type of 'buffer': System.Byte[]!
strTest = buffer.ToString()
strTest = System.Convert.ToString(buffer)
*/
Thanks.
... more >>
reading and writing to binary files
Posted by Robert Reijntjes at 3/16/2006 12:00:00 AM
Hi,
I need to read/write data from/to binary files that have an already
defined.
This means I can't define classes with the [Serializable] attribute.
The files also have arrays with variable length. This means I can't use
the StructLayout attribute like in here:
http://www.builderau.com.a... more >>
Webrequest Remove encoding from header
Posted by Bob at 3/16/2006 12:00:00 AM
Hi,
I have created a webrequest that is failing at the server because it has
Encoding =UTF-16 in the header. The server people want me to remove the
entry altogether.
I can't see where I have control over that with the WebRequest class.
Any ideas on how this is done?
Thanks
Bob
... more >>
Http in C# Windows Form
Posted by Jason Huang at 3/16/2006 12:00:00 AM
Hi,
In my C# Windows Form application, I would like to simulate clicking a hyper
link and go to a particular Http://...
How do I make that in my C# program?
Thanks for help.
Jason
... more >>
C# Web Service
Posted by Kiran A K at 3/16/2006 12:00:00 AM
Hi,
When I try to return an object of type
"System.Diagnostics.PerformanceCounter" from a web method (written in
C#) i got the following error:
Cannot serialize member System.ComponentModel.Component.Site of type
System.ComponentModel.ISite.
The above web service example is given in a t... more >>
SqlDataAdapter
Posted by Dragon at 3/16/2006 12:00:00 AM
If I drag and drop Table from Server Explorer into the WebForm, it will
create an DataAdapter
including all the Insert,Update, Delete, Select Statement
but After the Insert and Update Statement, there is a Select statment.
What is the purpose of that Select statement ?
What happen if I remove ... more >>
Webrequest Question.
Posted by Bob at 3/16/2006 12:00:00 AM
Hi,
I have a Webrequest that uses a XML doc for its 'body'
I need to know the length of the doc so I can set Webrequest header
ContentLength.
Currently I am using an XMLTextWriter to a filestream, reading that stream
back in to a Byte Array and writing the ByteArray to the Webrequest
poststrea... more >>
|