|
Thanks, it works grate ...
Thanks,
JanS
|
|
|
|
|
I tried to return a strong typed DataSet from a remote server to a windows form application using a SqlDataAdapter. It did not retieve any records. When I use the same code and return a DataSet it works. Could anyone tell me what I'm doing wrong?
When I use the same code in a Web Service, I was able to create a strong typed DataSet. But I can't use this because my client wants a remote server.
Here is the code:
public DsProject GetProject()
{
DsProject ds = null;
try
{
ds = new DsProject();
SqlDataAdapter da = new SqlDataAdapter(this.ProjectSelCmd);
da.Fill(ds);
}
catch(Exception ex)
{
ds = null;
throw(ex);
}
return(ds);
}
public DataSet GetProject2()
{
DataSet ds = null;
try
{
ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(this.ProjectSelCmd);
da.Fill(ds);
}
catch(Exception ex)
{
ds = null;
throw(ex);
}
return(ds);
}
|
|
|
|
|
Hi tcmgc,
What errors generated? I think you must have a local copy of this typed dataset both in server and client. Just a thought.
denpsia
-- modified at 19:32 Wednesday 21st December, 2005
|
|
|
|
|
There were no errors. The same strong typed DataSet is referenced by both the remote server and client.
I don't understand why the same code used to fill and update a strong typed DataSet with a SqlDataAdapter works in a Web Service, but not a remote server.
The only way I could get the strong typed DataSet to work in the remote server was to manually create it using a SqlDataReader to loop through and add rows.
|
|
|
|
|
try the other overload of Fill, which takes a table name, and provide the name of the table you want filled in your typed dataset
da.Fill(ds,"ProjectTable"); // for example
the reason whhy it works on the untyped dataset is that it creates a table for you which you can then see.
|
|
|
|
|
Hi is possible to chage ToString result for bool type to any languange or text example Si/No}
La realidad no es más que impulsos eléctricos del cerebro - Morpheus
|
|
|
|
|
you could try to overload it....never tried it, but maybe worth a shot...
or you could just build a method that verifies the si--yes, no--no, etc...
'course you could do some work with Localization, that would achieve the same/similar results depending on how/where its used.
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
write your own function that converts a bool to Si/No
|
|
|
|
|
string fromBool(bool value) { return value ? "Si" : "No"; }
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You could try passing in the appropriate CultureInfo into the ToString() method. I don't do much globalization in my code but I think that will work.
Jared Parsons
jaredp@beanseed.org
http://spaces.msn.com/members/jaredp/
|
|
|
|
|
i would to use this way to set a string in message box:
MessageBox.Show("{0} cars found", dataSetLocal.Tables[0].Rows.Count.ToString());
but it shows a messagebox with text = "{0} cars found"
and title 2 got from dataSetLocal.Tables[0].Rows.Count.ToString().
At the place of the message: "2 cars found"
|
|
|
|
|
Try this:
MessageBox.Show(string.Format("{0} cars found", dataSetLocal.Tables[0].Rows.Count.ToString()));
Roy.
|
|
|
|
|
Hi all,
i m doveloping an application in C#, and i want to use popup messages
in my application.
is someone who can help me.
Thank's
Vikrant Singh
|
|
|
|
|
Use the static messagebox class.
MessageBox.Show("error","caption");
|
|
|
|
|
Thank's
But i want Boallon Messages just like an error indicator in our system.
Means if i am opening the CallAction then it will show DueDate if pending
as a ballon Message when it is.
Bye..
Vikrant
-- modified at 14:18 Wednesday 21st December, 2005
|
|
|
|
|
IF your system is using a custom messagebox replacement you'll either need to get it's source, or if source isn't available (ie 3rd party wrote the app) you'll probably need to recreate the functionality from a standard form.
|
|
|
|
|
Thank's
I will try and i will send you the details.
Bye...
Vikrant
|
|
|
|
|
I want to store the path of an Access database that will be used during my application. When the application loads, it can check the path stored in a file of my choosing and determine whether or not the file is still in the same location. How would you suggest I store the path? A text file seems the simplest way to go, but would provide little or no security. Any suggestions would be appreciated. Thanks.
|
|
|
|
|
is this file path relative to the application being built?
or
is it static to each client the app will run on?
If the concern is someone coming across the file path storage device(ie textfile) you could try storing it encrypted then comparing the encyrpted file path
or if its just a concern of someone coming across it and modifying it by 'accident' you could store it in isolated storage...it would be harder for them to find it. there...you could also encyrpt it then as well.
-
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
The Access database itself will be in a location of the customer's choosing, probably on a server, while the the file holding the path will be relative to the application. I was just concerned about somebody who shouldn't know discovering the location of the database. It's probably not a huge concern because I'll put whatever security measures I can in place to protect the database itself. If they tinkered with the file holding the path, the application will simply not run (or not run correctly). I also plan to allow an authorized user to reset the path to the database (through an application form) should anything change (the location of the database, the file holding the path, etc).
Anyway, thanks. I'll try storing the data encrypted.
|
|
|
|
|
Try storing it in iso-storage(isolated) in encrypted form, and then pwd protect the access db...thats the best way i know to keep access safe on someone else's system.
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
Hi all
I am using CSGL Library , and when i am trying to make a debug build from visual studio .net 2003 it succeeded , and when i am trying to make a release build it failed and give me the following message
"An unhandled exception of type 'System.ArgumentException' occurred in system.drawing.dll
Additional information: Invalid parameter used "
how can i overcome this?
|
|
|
|
|
Hi,
I want to display the coordinates of the cusor next to it as it is dragged around a WinForm. I have the following skeleton code....
//////////////////////////////////////////
private void Form_1Paint(PaintEventArgs e)
{
//?? What to do
}
protected override void OnPaint()
{
//?? What to do
}
private void OnMouseMove(MouseEventArgs e)
{
//?? What to do
}
//////////////////////////////////////
I may have gotten some Args or Access modifiers wrong, but this is the general idea...I'd appreciate any code that will get this done... thanks
|
|
|
|
|
try this
private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
label1.Width = 150;
label1.Text="x = "+ Convert.ToString(e.X) + "\t y = " +Convert.ToString(e.Y) ;
}
|
|
|
|
|
Someone asked this last week and I still had this code in my test app which works
Point myMouse;
protected override void OnPaint(PaintEventArgs e)
{
Point screen = PointToScreen(myMouse);
string location = screen.ToString();
e.Graphics.DrawString("[Screen: " + location + "]",
new Font("Arial",8),
SystemBrushes.ControlText,
(PointF)myMouse);
}
protected override void OnMouseMove(MouseEventArgs e)
{
myMouse = new Point(e.X,e.Y);
Invalidate();
base.OnMouseMove(e);
}
Just paste that into an empty form underneath the constructor and it should work.
|
|
|
|