|
Yes I am using an Access database and I have tried to use Admin as the username but still is not working.
|
|
|
|
|
Hi.
I Need a sample code to connect to an Access DB and execute a query
such as select, insert, ...
I want to don't any work in design and all do in code, please.
Best wishes
|
|
|
|
|
Hi,
I have a datagrid and a datatable, and use the MouseMove event to bring up a tooltip. But now when I click on the cell, the MouseUp event doesn't fire. What can I do about this?
|
|
|
|
|
I just realized that it works under certain conditions. Here is what I have under MouseMove:
DataGrid.HitTestInfo hitInfo = dg.HitTest(new Point(e.X, e.Y));<br />
if (hitInfo.Row < tCat.Rows.Count && hitInfo.Row > -1)<br />
{<br />
if (hitInfo.Column == 1)<br />
{<br />
dg.CurrentCell = new DataGridCell(hitInfo.Row,hitInfo.Column);<br />
DataGridCell dc = dg.CurrentCell;<br />
string txt = dg[dc].ToString();<br />
<br />
if (txt.Length > 10)<br />
{<br />
tt.AutoPopDelay = 3000;<br />
tt.InitialDelay = 2000;<br />
tt.ReshowDelay = 3000;<br />
tt.SetToolTip(dg, txt);<br />
tt.Active = true; <br />
}<br />
else {tt.Active = false;}<br />
}<br />
else {tt.Active = false;}<br />
}
If I'm not in column one, the MouseUp works. But in column one, it doesn't, regardless of whether the tooltip is active or not.
Now I'm really confused.
Thanks,
Mel
|
|
|
|
|
I'm unclear about what your question is. Are you having problems with the MouseUp event when you are in Column 1? If so I don't see anything in your code that strikes me as bad but it's almost certainly this code. Try commenting out the code and trying again to verify this is the code at fault.
Jared Parsons
jaredp@beanseed.org
http://spaces.msn.com/members/jaredp/
|
|
|
|
|
Is it possible to write form variables to Word file variables in C#. I know this can be done in Windows Forms, but I would like to do it in a WebForm. Any help would be appreciated.
dstayton
|
|
|
|
|
What are word file variable? Do you want to write it to Microsoft Word or is it something else.
|
|
|
|
|
This is a template app.
I will have about 10 Word Files. Templates if you want to call them that. They will have embedded html controls(mainly textboxes).
The user will fill out the WebForm. When they are finished filling out the form, they will hit a create doc button which will trigger an event to open up the word file template with the variables from their form populating the corresponding variables in the Word File. They can then save the file on their desktop with evrything filled in.
So yes, in a nutshell, I want to take my form variable and write/populate it in the MS Word File. Hope that makes sense.
Thanks for your response.
dstayton
|
|
|
|
|
how can translate this html code to text
%d8%b1%d9%81%d8%ad
Palestine
|
|
|
|
|
|
This is not html encoded text, it's url encoded. Use UrlDecode as leppie suggested.
---
b { font-weight: normal; }
|
|
|
|
|
Hey,
I found this code snippet:
int numlabels = 5;<br />
int x = 8;<br />
int y = 8;<br />
int width = 80;<br />
int height = 16;<br />
int end = 2;<br />
<br />
Label[] LabelsI;<br />
<br />
this.SuspendLayout();<br />
for(int i = 0; i < numlabels; ++i )<br />
{<br />
LabelsI[i] = new Label();<br />
LabelsI[i].BackColor = System.Drawing.Color.Beige;<br />
LabelsI[i].Size = new System.Drawing.Size(width, height);<br />
LabelsI[i].Location = new System.Drawing.Point(x, y);<br />
this.Controls.Add(LabelsI[i]);<br />
<br />
x = x + (width + end);<br />
}<br />
this.ResumeLayout(true);
But when I try to use it, it comes with this error :
Use of unassigned local variable 'LabelsI'(CS0165)
Could someone please help me with this...
Thanks,
JanS
|
|
|
|
|
Label[] LabelsI = new Label[numlabels];
Declare AND initialize the label array...
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
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.
|
|
|
|