|
|
Sorry but someone else had post unhelped this answer, I didn't post by myself.
sure I will delete it.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
KMAROIS wrote: case >; 80:
is this a new syntax introduced in C#?
|
|
|
|
|
I'm exporting data from a datagrid to an excel spreadsheet.I want the spreadsheet to open and display the data when the data is exported(when you click button export).How do i go about making that happen.Please help
|
|
|
|
|
Twyce wrote: I want the spreadsheet to open and display the data when the data is exported(when you click button export).
Once you export the data and file has been written, open the Excel application passing the recently written file name.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
hi,
can you please tell how you are exporting data from datagrid?
I need it urgently.
I donot have MS office installed on server
|
|
|
|
|
Im trying to create a crystal report with a subreport.. for every line that display on the main report there will be a subreport and the subreport uses a value from the line that has been displayed as its parameter.. can anyone please help with this? i created a dataset that has a datatable, i fill the dataset and point this to the subreport like this(am not sure if this is right):
SqlDataAdapter subReportAdapter = new SqlDataAdapter(query, connString);
DataSet2 ds2 = new DataSet2();
subReportAdapter .Fill(ds2, "BookedTimes");
venueReport.Subreports["TimesSubReport"].SetDataSource(ds2);
It just throws an error in runtime saying "Invalid argument provided".
|
|
|
|
|
any one has an example on how to override the style of the splitter on windows form using c#?
I want to have something like MS Outlook or Windows Vistal Explorer splitter?
|
|
|
|
|
|
Hi,
I have to install a driver msi-package (B.msi) in the installation of my application (A.msi). But it is not possible to install an msi while an other msi is running. Is there a way to start installation B.msi after the installation of A.msi, if the user doubleclicks only A.msi?
Thanks!
Ariadne
|
|
|
|
|
Ariadne wrote: Is there a way to start installation B.msi after the installation of A.msi, if the user doubleclicks only A.msi?
What about using a batch file that will run A.msi first and after that B.msi
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Manas Bhardwaj wrote: What about using a batch file
not bad, but there are customers, who do not look. If they see an msi-file, they click on it.
(The driver msi B.msi is part of A.msi, it is deployed after A.msi starts.)
I thing, I have to spawn a task in A.msi, which starts after A.msi has completed. - But how?
Ariadne
|
|
|
|
|
|
Go through a tutorial on the Web. They're free.
|
|
|
|
|
|
Hi guys. I hope somebody can help me here. I am reading a file and checking a Database if the record exists, if the records exists I am updating the database with some other information. Now, this was working a few days ago but for strange reason it is not working now. Can somebody please have a look at the below?
foreach (GrpCombi grp in res)
{
dataTable.Clear();
dataAdapter = new OleDbDataAdapter("Select * From [Analysis] WHERE HOLDER_IDENTIFIER = '" + grp.AccountNo + "'", conn);
OleDbCommandBuilder cmdBuilder = new OleDbCommandBuilder(dataAdapter);
dataAdapter.Fill(dataTable);
if (dataTable.Rows.Count != 0)
{
MessageBox.Show(dataTable.Rows[rowPos]["HOLDER_IDENTIFIER"].ToString());
dataTable.Rows[rowPos]["SapoBal"] = grp.AccountBal.TrimStart(myChar);
dataAdapter.Update(dataTable);
progressBar1.Invoke(new updatebar(this.UpdateGroupProgress));
}
else
{
sw.WriteLine(grp.AccountNo + "," + grp.AccountBal);
}
The error I am getting is on the line dataAdapter.Update(dataTable); . The error message reads as follows:
System.InvalidOperationException was unhandled<br />
Message="Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information."<br />
Source="System.Data"<br />
StackTrace:<br />
at System.Data.Common.DbDataAdapter.UpdatingRowStatusErrors(RowUpdatingEventArgs rowUpdatedEvent, DataRow dataRow)<br />
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)<br />
at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)<br />
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)<br />
at SasolDataAnalysis.Form1.GroupImport() in C:\Documents and Settings\Bernard\My Documents\Visual Studio 2005\Projects\SasolDataAnalysis\SasolDataAnalysis\Form1.cs:line 233<br />
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)<br />
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br />
at System.Threading.ThreadHelper.ThreadStart()<br />
I added a message box to capture the record if it is found, which it does but when it does the updating it fails. Any hel;p would be greatly appreciated.
Cheers
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Have you specified in the database table that the HOLDER_IDENTIFIER is the primary key?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
No. But the table does not have a primary key. Could that be the p[roblem?? That it doesn't have a primary key??
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Kwagga wrote: No. But the table does not have a primary key. Could that be the p[roblem?? That it doesn't have a primary key??
Yes. It doesn't know what to put in the where clause to identify the record to update if there is no key.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
Hi I'm writing an app that will have some Word automation, but I can not be certain if the user has already got an instance of word open, if they do i wish to use there unstance do my automation or else start a new instance. My problem is if they have it open my code makes a new instance and will close down the both instance when i finish can any one help.
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using Word=Microsoft.Office.Interop.Word;
using System.Runtime.InteropServices;
using core= Microsoft.Office.Core;
using System.Diagnostics;
namespace WordProcess
{
public partial class MainForm : Form
{
Word.Application wordApp;
Word._Document wordDocument;
object document;
object wordFalse = false;
object wordTrue = true;
object dynamic = 2;
object wordMissing = System.Reflection.Missing.Value;
public MainForm()
{
InitializeComponent();
}
void Button1Click(object sender, EventArgs e)
{
System.Diagnostics.Process[] wordPro = System.Diagnostics.Process.GetProcessesByName("winword");
if (wordPro.Length==0){
Process p= Process.Start("WINWORD.EXE");
p.WaitForInputIdle();
}
try{
object filePath =@"C:\test.doc";
object filePath1 =@"C:\test1.doc";
wordDocument = new Word.DocumentClass();
wordApp = (Word.Application)Marshal.GetActiveObject("Word.Application");
wordApp.Documents.Open(ref filePath, ref wordMissing, ref wordFalse, ref wordMissing,
ref wordMissing, ref wordMissing, ref wordMissing, ref wordMissing,
ref wordMissing, ref wordMissing, ref wordMissing, ref wordTrue,
ref wordMissing, ref wordMissing, ref wordMissing, ref wordMissing);
wordDocument.SaveAs(ref filePath1, ref wordMissing, ref wordFalse, ref wordMissing,
ref wordMissing, ref wordMissing, ref wordMissing, ref wordMissing,
ref wordMissing, ref wordMissing, ref wordMissing, ref wordTrue,
ref wordMissing, ref wordMissing, ref wordMissing, ref wordMissing);
wordDocument.Close(ref wordFalse, ref wordMissing, ref wordMissing);
wordApp.Quit(ref wordMissing, ref wordMissing, ref wordMissing);
}catch(MarshalDirectiveException mw){
MessageBox.Show(mw.ToString());
}catch(Exception ex){
MessageBox.Show(ex.ToString());
}
}
}
}
|
|
|
|
|
Instead of quitting if you would just kill the process that your application started, then it should work fine.
"If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be 'meetings'." - Dave Barry
|
|
|
|
|
the problem is it checks for a process and will start one fine but if there is one running the application will start a second instance of Word up that is ties to the first
|
|
|
|
|
In that case easiest way I can think of is start new winword process through your application and then kill it without harming any other word document.
"If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be 'meetings'." - Dave Barry
|
|
|
|
|
thats something I'm looking at present myself main problem is making sure i only close down the new process any ides would be great thanks.
|
|
|
|