|
I build an application in C# with crystal reports. If I try to use application in user's machine, when I open some crystal rep. I get this messagebox:
Cannot find keycodeV2.dll or invalid keycode.
Can somebody tell me what's the problem
kpp
|
|
|
|
|
Search Google. Crystal is notorious for this. Also, you can only redistribute binaries and not source with Crystal unless everyone has a license.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
I have written a window service in C#. On windows XP it runs fine. I checked it on my computer and some other computers in office. I am able to install it on production system. But when i try to run this service i receive following error:
"ERROR 1053: The service did not respond to the start or control request in timely fashion"
I google on this error. Most of people are saying that Start method of service should return as soon as possible. In my start method, i am opening a file, making a socket and creating and starting a thread.
After this when i try to uninstall the service i got following error:
Exception occurred while initializing the installation:
System.BadImageFormatException: Could not load file or assembly 'file:///C:\game firewall\New Folder (4)\Firewall.exe' or one of its dependencies. The module was expected to contain an assembly manifest..
ANY BODY COULD TELL ME TO RESOLVE THAT PROBLEM?
|
|
|
|
|
Well, is that file there in the first place? Also, why on earth would you want to name an application folder New Folder (4) ?
If the file *is* there and you *want* that folder name, check the folder permissions. Then try opening it using ildasm.
Cheers,
Vikram.
"I will put my new found knolage to good use" - Captain See Sharp.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed." - Gary Wheeler.
|
|
|
|
|
I have to copy again to uninstall the windows service. That is why "New Folder (4)" i am copying fourth time to uninstall the application and then trying to reinstall.
I have given all permission to administrator as well as creator. By using ildasm i compare uploaded exe file and local exe file. Both have same manifest also same structure of classes.
ANY OTHER HELP?
|
|
|
|
|
I have a ComboBox that is populated with values from a MS Access table. Next I use the below code to delete the record that is selected in the comboBox.
private void button3_Click(object sender, EventArgs e)
{
OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Magazi.mdb");
conn.Open();
OleDbCommand cmd = new OleDbCommand("DELETE FROM Suppliers WHERE Name=@Name", conn);
OleDbParameter parDel = new OleDbParameter();
parDel.ParameterName = "@Name";
parDel.Value = comboBox1.SelectedItem;
cmd.Parameters.Add(parDel);
cmd.ExecuteNonQuery();
conn.Close();
}
For some reason I get an "OleDbException was unhandled" message...
|
|
|
|
|
Plz. use "comboBox1.SelectedValue" rather than comboBox1.SelectedItem;.
|
|
|
|
|
SelectedItem.ToString(); might solve your problem. If you're adding objects rather than strings so your comboBox make sure you've overridden the ToString method.
|
|
|
|
|
Ok. I have tried some things and this what I get...
Using the below code and I have also display member, value member and SelectedValue of the comBox set to Name.
private void button3_Click(object sender, EventArgs e)
{
OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Magazi.mdb");
conn.Open();
OleDbCommand cmd = new OleDbCommand("DELETE FROM Suppliers WHERE Name=@Name", conn);
OleDbParameter parDel = new OleDbParameter();
parDel.ParameterName = "@Name";
parDel.Value = comboBox1.SelectedValue.ToString();
cmd.Parameters.Add(parDel);
cmd.ExecuteNonQuery();
conn.Close();
}
When I try to select a value from comboBox I get this message:
Column 'Name' is constrained to be unique. Value 'Champion' is already present.
|
|
|
|
|
Use this
comboBox1.SelectedItem.ToString();
|
|
|
|
|
Hi Guy
I seen your code in above. i seen may be ur combobox haven't a selected value may be pass null value, so error will raise.
and second may be comboBox haven't records. so verify both condition after get comboBox1.SelectedItem.
when directly to use comboBox value we must do validations.that's give error free to us.
thanks
Cheers
RRave
MCTS,MCPD
|
|
|
|
|
Hi Guroos,
I want to send newsletter to all recipients. I do not want to write all email address in BCC. and Also do not want to write in TO box. What should I do?
Simply I want every member should get newsletter with his own email address in TO box.
|
|
|
|
|
AkmalSyed,
You could do it in a loop.
foreach (string email in emailCollection)
{
string header = "welcome to spammers are us!";
string body = "your message";
Email email = new Email();
email.Header = header;
email.Body = body;
email.EmailAddress = email;
email.Send();
}
|
|
|
|
|
Dear.
Please send solution in C#. I am using ASP.NET,C#
S.Akmal
|
|
|
|
|
Jamman wrote: Please send solution in C#. I am using ASP.NET,C#
It's rude to ask people to do your work for you. The poster gave you some useful advice. I suggest you use it to solve the problem yourself.
If you want someone to do you your work, go to Rent A Coder. This site is for people who want to learn.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi every buddy
i have to display a image on the page to how to do that?
image is a animated image,
plz help.
Rajeev Kr. Sharma
VRI Software Pvt.Ltd.
New Delhi India
HumOnline.com
Stay Connected
|
|
|
|
|
RajeevKumarSharma wrote: display a image on the page
If you mean a web page, you can use Img[^] tag
If you are trying to use display it in a form, use PictureBox[^] control
*jaans
|
|
|
|
|
private Bitmap MyImage ;
public void ShowMyImage(String fileToDisplay, int xSize, int ySize)
{
// Sets up an image object to be displayed.
if (MyImage != null)
{
MyImage.Dispose();
}
// Stretches the image to fit the pictureBox.
pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage ;
MyImage = new Bitmap(fileToDisplay); HOW TO GIVE HERE FILE PATH WHICH EXIST IN MY PROJECT
pictureBox1.ClientSize = new Size(xSize, ySize);
pictureBox1.Image = (Image) MyImage ;
}
please look on the bold,under line text
Rajeev Kr. Sharma
VRI Software Pvt.Ltd.
New Delhi India
HumOnline.com
Stay Connected
|
|
|
|
|
Just use the relative path for fileToDisplay. Example: "cool.bmp" or "..\\images\\cool.bmp".
Cheers,
Vikram.
"I will put my new found knolage to good use" - Captain See Sharp.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed." - Gary Wheeler.
|
|
|
|
|
RajeevKumarSharma,
You have to ways. Use Graphics to do it, or use a PictureBox. I am guessing your pretty new to C# so id go with PictureBox.
Regards,
Gareth.
|
|
|
|
|
This should do what you want
Bitmap pic = new Bitmap(fname);
xsize = pic.Width;
ysize = pic.Height;
// Adjust the position of the picture box
pictureBox1.Location = new System.Drawing.Point((0, 0);
// Adjust the size of the picture box
pictureBox1.Size = new System.Drawing.Size(xsize, ysize);
// Display the image
pictureBox1.Image = pic;
|
|
|
|
|
I have a dropdownlist that contains items ,
each item points to the each tablename of a fixed database.
I simply added a blank CrystalReport1 without adding any table, any logon informatio while creating Crystal Report.
and also added CrystalReportViewer Control.
private void Page_Load(object sender, System.EventArgs e)
{
if(dropdownlist1.Selectedvalue=="Table1")
{
SqlConnection con=new SqlConnection();
con.ConnectionString="Server=.;uid=sa;pwd=abc;database=db";
con.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from table1",con);
DataSet ds=new DataSet();
da.Fill(ds);
//ds.Tables.Add();
CrystalReport1 report2=new CrystalReport1();
//report2.SetDatabaseLogon("userid","pwd");
report2.SetDataSource(ds);
//CrystalReportViewer1.DisplayGroupTree = false;
CrystalReportViewer1.ReportSource =report2;
CrystalReportViewer1.RefreshReport();
}
else if(dropdownlist1.Selectedvalue=="Table2")
{
SqlConnection con=new SqlConnection();
con.ConnectionString="Server=.;uid=sa;pwd=abc;database=db";
con.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from table2",con);
DataSet ds=new DataSet();
da.Fill(ds);
//ds.Tables.Add();
CrystalReport1 report2=new CrystalReport1();
//report2.SetDatabaseLogon("userid","pwd");
report2.SetDataSource(ds);
//CrystalReportViewer1.DisplayGroupTree = false;
CrystalReportViewer1.ReportSource =report2;
CrystalReportViewer1.RefreshReport();
}
}
and so on.........
=====================================================
crystal Reprt is coming without data and columns of the table,(Ensuring the table contains data),i think the dataset is not attached ,
How can i attach database and dataset dynamically
Please solve this.....
|
|
|
|
|
Hello.
I have a windows application in C# with Office 2003 interop. On a form I have a TreeView and a new Word instance. I want to know haw can I catch the Drag & Drop event from the TreeView onto the Word Control.
Thanks.
|
|
|
|
|
Anyone used NDoc, it does not compile help when the C# 2.0 templates are in the code, producing null reference exception. Anyone handled this without removing C# templates?
chesnokov
|
|
|
|
|
Don't use NDoc. Microsoft has released SandCastle which takes care of this neatly. At the moment SandCastle is entirely command line driven, but you can find a GUI SandCastle manager here on CodeProject (clickety)[^].
|
|
|
|