|
Oops , im sorry George, i feel really stupid , i was too sleepy when i posted this message that im shocked now when i read it!! anyhow, the error was ora-00911 invalid character, the fields are ok, number(2) and varchar2(12) and the data is (1,one), but dont worry, i found out what was the problem, believe it or not it was because of containing a ";" in the select statement when loading the datasource to the data grid, now i have another problem that keeps on bugging me, it hangs on adapter.fill(dataset,"someTable"); i think it i need to add a command builder, however im surprised that we have to edit the automatically generated code from dragging the datatable to the forms! it would've been nicer if we could just drag and drop these bloody repetitve tasks!! i was happy when i thought i can do that all the time!! are you getting the same problem?? im using .net 2005, please let me know, and thank you for taking the time to read this, thank you George!!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Actually, I avoid the automatically generated code because it usually doesn't meet my needs and it seems to go whacky if I try to change it. So, I create my code manually.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
George L. Jackson wrote: I create my code manually
i do too and this's my first time i need it automatically so bad cuz i have so much tables and fields to be bound to controls so i thought it would save me much time and trouble to perform such routinous task, thanx anywayz, i found out what was the problem and i want to share it in the forum for those who may run into the same stupid problem!!
invalid host/bind name was because i used the keyword "DESC" as a field name in the table im referencing in the database, it was stupid cuz oracle accepted it very well!! so i thought it's fine to name a field with a keyword but not the table, and what's more, it binds normally to the control when loading "which means the field name is only fine for reading!" but when trying to launch the adapter.update(dataset) you get this wonderful error that has nothing to do with the real problem!! i'v always hated oracle's error messages cuz they never lead me to the cause of the error!
cheers
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Dear All,
I have facing an error during running my crystal reports from vs-2003(C#).
The error ocures in the following code:
showReportUI.rptViewer.SelectionFormula
= "{v_preg16_bl.issu_date} ORDER BY Asc";
v_preg16_bl is a view created in SQLserver 2000.issu_date is a column of this view.
I want to sort the data using SelectionFormula by Ascending order but the above code does not work.I mean an error ocured in the ORDER BY syntax.
Is it possible to sort my data using SelectionFormula?
Looking your help for solving the problem.
Robi
Software Programmer
|
|
|
|
|
Dear All,
I have facing an error during running my crystal reports from vs-2003(C#).
The error ocures in the following code:
showReportUI.rptViewer.SelectionFormula
= "{v_preg16_bl.issu_date} ORDER BY Asc";
v_preg16_bl is a view created in SQLserver 2000.issu_date is a column of this view.
I want to sort the data using SelectionFormula by Ascending order but the above code does not work.I mean an error ocured in the ORDER BY syntax.
Is it possible to sort my data using SelectionFormula?
Looking your help for solving the problem.
Regards
Robi
Robi
Software Programmer
|
|
|
|
|
hi Robi,
use RecordSelectionFormula/SelectionFormula only to limit the number of records based on a specific criteria. to sort fileds add a SortField to the DataDefinition object of the report. make sure you have created the sort formula in report before assigning a value to it at runtime.
Rep repObj = new Rep(); //existing report in project
FieldDefinition fd = repObj.Database.Tables[0].Fields[0]; //indices as appropriate
repObj.DataDefinition.SortFields[0].Field = fd;
repObj.DataDefinition.SortFields[0].SortDirection = CrystalDecisions.Shared.SortDirection.DescendingOrder;//as appropriate
this.crystalReportViewer1.ReportSource = repObj ;
|
|
|
|
|
ok
hi
i have problem in doing with database files
i created small project whitch can doing with database just like
(Insert - Update - Delete) Records .
the project doing well (no bugs - no errors)
but if i want to run this source code in another pc
what should i do to run automaticly without modifying sqlconniction string
or attach the dataBase then
is there any way to doing with dataBase files directly
or what the last step i should do to build my project (just to run on other pc's)
please if any one can help
send me at
kifahhk@hotmail.com
|
|
|
|
|
The only way to avoid connection strings is to
1 - use Access MDB files and ship them with the app
2 - use localhost in the connection string and make sure SQL Server is installed as an unnamed instance with your app. And that scripts run to create the database.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
Is there a possibility to add reference to assembly that is an exe ??
if so please tell me how?
karam C Bose
|
|
|
|
|
Hi!
With VS2005 you can directly reference an exe, IIRC.
With VS2003 or earlier, you can simply rename the .exe to .dll and reference this file.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
|
I created a .dll in C# using the "Class Library" option in Visual Studio .NET 2005. I also created a test application, and the .dll works flawlessly with it. The problem comes when I try to add it to Access (2000 or 2003). Access says it can't be done. I have come to believe that I need to register the .dll and I've tried to do so using the following lines in the command prompt:
cd /d %windir%\system32
regsvr32 "(absolute path to .dll)"
When I do this, I get an error saying that it can't find the entry point of the .dll. I don't know how to fix this. Any help is greatly appreciated.
-Fred Morstatter
|
|
|
|
|
Hi , to register your .Net DLL as a COM like stuff, you have to use regasm.exe tool, also do not forget to give the [GUID.....] attribute to your class,
you can also go by another approach of using tlbexp.exe to get a COM like dll and then register using regsvr32.
Live and let live
|
|
|
|
|
You're mistaken. The dll is not a COM dll, and therefore cannot be registered. What makes you think that Access should be able to use a .NET dll ? 2000 is before .NET was released.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi Chris,
We can export it in to COM using tlbexp, is that not possible??
|
|
|
|
|
1. How to get actual usage of processor?
2.How to get actual usage of RAM ?
3.How to get list of physical drives ?
4.How to get information about network card?
I will be very greatfull if you could give me answer to any of that questions, thank you very much in advance!
|
|
|
|
|
WMI is what you need for most of this. To get the drives is easy, there's an API that returns them all, in System.IO, from memory.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Could you tell me some more about it?
|
|
|
|
|
hi there.
to use WMI, visit "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_reference.asp"
here is an example to collection physical drive info.
namespace: System.Management
ConnectionOptions conOpt = new ConnectionOptions();
conOpt.Username="administrator";
conOpt.Password="password";
ManagementScope localScope = new ManagementScope("\\pcgnadeem",conOpt);//computer name
ManagementObjectSearcher searcher = new ManagementObjectSearcher();
//searcher.Scope=localScope;//required only for remote computers
ObjectQuery query = new ObjectQuery("Select Name from Win32_LogicalDisk Where DriveType=3");
searcher.Query=query;
ManagementObjectCollection ResultsCollection = searcher.Get();
foreach(ManagementObject obj in ResultsCollection){
MessageBox.Show(obj["Name"].ToString());
}
|
|
|
|
|
hi,
in the link below is an example of what I want to achieve, but in a smart client winforms app.
in my app, the listboxes would be directly on the Employee add/edit form.
http://examples.codecharge.com/ExamplePack/ManyToManyListboxes/ManyToManyListboxes.php?emp_id=20
i've been googling for days, but haven't found an example, and I am too unexperienced to figure it out by myself.
any help or pointing in the direction very much appreciated
am using VS2005, in a C# Windows application.
Let's say I want a form to add a new Employee and assign projects to him on the same form by having a list of available projects and a list of selected projects.
Should the first list box be databound to a bindingsource ? When I assign a project to the employee it should dispaear from the available list, but not from the underlying database.
The selected projects should add records to the Employee_project table (join table for the many to many relationship)
I'd like to see an example of this using bindingsources as the datasource for the listboxes.
i'm using nettiers/codesmith
|
|
|
|
|
hi all,
I am presently creating a text editor for c# .In that application I would like to include one help file in the menu item for c#.I have written the help file in notepad and now when I click the c# menuitem it should open the help notepad to the viewer.
can anyone tell me how to do this.
Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.
|
|
|
|
|
you could try Process.Start()
ex Process.Start(@"C:\windows\system32\notepad.exe",@"C:\help.txt")
More Info[^]
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
hi all,
I am presently creating a text editor for c# .In that application I would like to include one help file in the menu item for c#.I have written the help file in notepad and now when I click the c# menuitem it should open the help notepad to the viewer.
can anyone tell me how to do this.
Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.
|
|
|
|
|
process.start can be used to open a file with the default program.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I am working on simple file downloader but I got stuck, I dont know how to limit speed of download ?
Is there any way to limit download speed ?
|
|
|
|