|
Yes, I have plenty. However, an example is not necessary. In the report creation wizard you can select ADO.NET as the report source, and then select a stored procedure from the list that appears. (If memory is failing me you may have to select ODBC source and not ADO.NET since I think ADO.NET is for datasets only)
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
thanks for your answer
but i have problem about to send parameter to proc
please send me 1 or 2 example
i need it
thank you very much
|
|
|
|
|
Hi,
I use conditional compiling via to block login dialogs while debuging.
#if DEBUG
sSqlUserName = "me";
sPwd = "123456";
#else
#endif
This work well and saves me typing my user name and password a thousand times.
However I was wondering if any of the code or strings inside the if #DEBUG make it into the exe when compiling the release version. If they do, I suppose one should make sure to remove the hard coded user name and password prior to releasing the app.
Anyone know how this works?
Thanks.
Tim
|
|
|
|
|
They won't be compiled into the exe unlesss the DEBUG directive is defined.
You can also examine this using a free tool named .NET Reflector[^].
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
With the bad habit of debug builds getting passed into production I would make your own preprocessor declaration and then add it to your personal projects build options.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
And let that slip into production rather
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
My build settings don't get checked in so ...
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: My build settings don't get checked in so ...
Compilation directives are stored in the csproj file. I sure as hell hope you check that in, unless you some sadist bastid that let others create their own project files...
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
You know me better than I know myself ...
Actually, I keep my local project file writable unless I am adding files and such because I don't like to check in settings like you said.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
StringBuilder results = new StringBuilder();
//Create GPO Table
results.Append("Creating GPO Table");
DataTable GPOtable = new DataTable("Group Policy");
DataColumnCollection GPOCol = GPOtable.Columns;
GPOCol.Add("GUID", typeof(string)).Unique = true;
GPOCol.Add("Name", typeof(string));
GPOCol.Add("Domain", typeof(string));
GPOCol.Add("Created", typeof(DateTime));
GPOCol.Add("Modified", typeof(DateTime));
GPOCol.Add("Status", typeof(string));
// Set Primary Key
results.Append("Creating primary key");
GPOtable.PrimaryKey = new DataColumn[] { GPOCol["GUID"] };
//Add table to Dataset
results.Append("Saving new table to Database");
DataSet1.Tables.Add(GPOtable);
I am trying to save this new table to an access database, i have the database connection setup in my app.config and the dataset1 is the dataset to the DB
Is there something I am doing wrong in the code above?
|
|
|
|
|
Yes, you can't do what you're code is describing. You cannot create tables and columns in a DataSet object and expect it to automatically create the appropriate tables and columns in the database. It doesn't work like that.
You have to generate and execute the appropriate SQL Statements against the database directly to do this. You cannot use a DataSet object to do it for you.
|
|
|
|
|
I have developed a winforms app running on Windows XP on a Wyseterm S90, which needs to be running constantly to register cardswipes from a remote device (connected via serial over cat5) and display on a remote monitor (vga over cat5). Everything runs sweetly up until the point that the S90 terminal decides that as it hasn't had a mouse movement or keypress recently, and flips the monitor into standby. So far I have:
Checked the power management and screensaver settings - both set to permanently on
Checked the group policy for the account logged into the device
Added some code to "jiggle" the mouse by a pixel every other second, via both Cursor.Position and OnMouseMove
Nothing seems to persuade the device to stay awake, and I'm almost out of letters to assign to my cunning plans. Can anyone suggest any more alternatives? Is there a SystemEvents event that I can catch and/or trigger to keep the little blighter alive?
Thanks in advance,
Al
|
|
|
|
|
The last two posts on this page[^] may help.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Thanks for this Dave - it definitely seems to be pointing in the right direction.
|
|
|
|
|
I have added shared remote printers to a machine as follows:
printer1 on printserver
printer2 on printserver
printer3 on printserver
...
There is also a local shared printer on this machine.
i.e. printerLocalA
I am not sure why my code does not read the list of the remote printers. It only reads the printers that are local i.e. PrinterLocalA.
This is what I am using and it seems the code is correct but there is something wrong with the way the printers are added I think.
Do you agree?
Any solutions please?
using system.printing;
PrintServer myPrintServer = new PrintServer(@"\\" + txtServerName.Text.Trim());
// List the print server's queues
PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();
foreach (PrintQueue pq in myPrintQueues)
{
comboBox3.Items.Add(pq.Name);
}
Thanks
|
|
|
|
|
hello everybody
i have a function that save my datatable to an excel file:
int columnIndex = 0;
Microsoft.Office.Interop.Excel.ApplicationClass excel = new Microsoft.Office.Interop.Excel.ApplicationClass();
excel.Application.Workbooks.Add(true);
foreach (DataColumn dc in dataSet.Tables[1].Columns)
{
columnIndex++;
excel.Cells.ColumnWidth = 25;
excel.Cells[1, columnIndex] = dc.ColumnName;
}
int rowIndex = 0;
foreach (DataRow dr in dataSet.Tables[1].Rows)
{
rowIndex++;
columnIndex = 0;
foreach (DataColumn dc in dataSet.Tables[1].Columns)
{
columnIndex++;
excel.Cells[rowIndex + 1, columnIndex] = dr[dc.ColumnName];
}
}
excel.Save(@"C:\SomeName.xls");
what is going on is that a pop up window ask me "if i need to save my excel sheet', if i agree both files are saved one in c:/someName.xls and another for the pop up window. i don't want the pop up to be displayed i just need to save programatically my datatable.
i'm new in excel things please any help
kind regards
|
|
|
|
|
If I remember correctly, you must set the Saved property of a workbook to true . Save method doesn't automatically mark the workbook as saved.
The need to optimize rises from a bad design
|
|
|
|
|
dear Mika,
thank you for your answer
i aklready added to my code :
excel.ThisWorkbook.Saved = true;
it gave me an error "0x800A03EC"...get.thisWorkbooks()...
please could you help me how to set this property to true.
best regards
|
|
|
|
|
i'm sorry it was ActiveWorkbook.Saved not thisWorkbook.saved, now it's working fine thank you for your advise
|
|
|
|
|
No problem, glad you got it solved
The need to optimize rises from a bad design
|
|
|
|
|
Hi i want to fetch data from a website that which has 1000's of pages and put it in a excel file.
how should i go about doing it?
|
|
|
|
|
ivix4u wrote: how should i go about doing it?
Well, I would start off by defining my requirements and then moving onto producing a fairly detailed breakdown. At this stage, I'd feel ready to fire up Visual Studio and start off a new project. From there on, it's just code.
|
|
|
|
|
I might even throw in a few Visio pictures to help with the user review of the spec
Bob
Ashfield Consultants Ltd
|
|
|
|
|
|