|
hi
how to create arraylist files?
i want to add modifi and erase inside datas
help me
thanks
|
|
|
|
|
suthagar wrote:
how to create arraylist files?
An arraylist is a data structure. What do you want to do, place the contents of an arraylist into a file ? All you need to do is use for each to step through the array list.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
i'd like to make an application that runs on the site without posting back, like the java applet, but i don't want to write java, so my questions is , is there anyway that let me make somethin like the java applet in C# ASP.NET ??
where can i look at ?
thanx
|
|
|
|
|
Why would you want to do that ? Your users would have to download it, and they would have to have the .NET runtime installed. What's the benefit of embedding it in a browser if you're just going to send them the .exe anyhow ?
You could do that with ActiveX controls, so I don't see any reason why you couldn't do it in C#, given that C# can be used to write COM components.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
i want to do that coz i'd like to make somthin like playing chess on the web, that don't require posting back to the server, actually i didn't use activex b4, so i'll take a look,
thanx for reply
|
|
|
|
|
Maybe you are thinking of web services? Im somewhat confused by the question.
You can find how the description of how to set them up here:
http://www.codeproject.com/cs/webservices/
You will need a server running IIS with ASP.Net going on too. Basically, you can call a void function or something like this? This isn't a site though. I think there is a way to call managed code just from a script so you can just use that if you want.
I hope this helps,
|
|
|
|
|
Hi,
How do i show all tables from a Ms-Access database using OleDBConnection?
Thank u very much,
Dirso
|
|
|
|
|
I am working with an application that requires the utilization of the System.Diagnostics namespace. It involves the creation of a new process(), but I would like the process to NOT open a new window when process.start() occurs. I would prefer the process to run transparently in the background.
I realize that there is a System.Diagnostics.process.startinfo.createnowindow method that I believe would prevent the process from opening a new window with the required file information (ie a compressed .zip file using WinZip) but when I use this method, it still opens the winzip program with the appropriate process.FileName that I pass to it.
What is the proper syntax to use the process.startinfo.createnowindow method? How could I prevent the winzip application from opening? Any ideas?
|
|
|
|
|
Hello,
I have a structure that I want to fill with bytes from a byte array.
public struct DUMMY<br />
{<br />
public ushort dummy1;<br />
public ushort dummy2;<br />
public ushort dummy3;<br />
public ushort[] dummy4;<br />
}<br />
<br />
private byte [] filedata = new byte[512];<br />
<br />
public void MemCopy(ref byte [] source, ref object dest)<br />
{<br />
IntPtr Ptr = Marshal.AllocHGlobal(Marshal.SizeOf(dest));<br />
Marshal.StructureToPtr(dest, Ptr, true);<br />
int size = Marshal.SizeOf(dest);<br />
Marshal.Copy(source, 0, Ptr, size);<br />
}<br />
<br />
<br />
I tried to do it with the MemCopy function but after the Copy dest is still empty. All I'm looking for is a c++ memcpy replacement. If possible in a Managed way.
Thanks,
Arjan
|
|
|
|
|
|
HI,
i am trying to retreive records for order with in a specified range of dates. I have created sql string as follows :
//create the sql
sql = "SELECT * FROM vShipments WHERE DateOrdered BETWEEN'" + txtOrderDateFrom.Text + ", '" + "AND '" + txtOrderDateTo.Text + "'";
-------------------------------------------
On execution, i am getting following error(s) :
System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
at System.Data.SqlClient.SqlDataReader.Read()
at InventoryControl.frmShipments.PopulateListView(String filter) in d:\shirtuniverse\inventorycontrol\frmshipments.cs:line 786
------------------------------------------------------------
Any idea(s) : what i am doing wrong
Thanx in advance
|
|
|
|
|
ronin1770 wrote:
//create the sql
sql = "SELECT * FROM vShipments WHERE DateOrdered BETWEEN'" + txtOrderDateFrom.Text + ", '" + "AND '" + txtOrderDateTo.Text + "'";
Looking this over are you sure you need the comma after the first date. Its inside the single quote. You might try:
sql = "SELECT * FROM vShipments WHERE DateOrdered BETWEEN '" + txtOrderDateFrom.Text + "' AND '" + txtOrderDateTo.Text + "'";
Steve Maier, MCSD MCAD
|
|
|
|
|
ronin1770 wrote:
Any idea(s) : what i am doing wrong
This probably isn't what you were looking for, but I feel that I'd be remiss if I didn't point it out anyway.
Since you're simply echoing user input (txtOrderDateTo.Text ) into a SQL statement, you have left yourself wide open to a SQL injection attack. Google will yield you a good set of results on a search. For convenience, here is an article[^] to get you started.
Hope that helps a bit.
--Jesse
|
|
|
|
|
ronin1770 wrote:
Any idea(s) : what i am doing wrong
So many things, it's almost funny!
1) You're using string concatentation to build an SQL statement. The gods around here will smite you for such foolishness. Like the other posters pointed out, you have opened yourself up to many an SQL injection attack.
2) There is no space between the keyword BETWEEN and the single quote next to it. There should be...
3) A comma between your first date and the keyword AND will cause an error in the SQL statement.
4) Your completely at the mercy of the user to type in the date in the EXACT format that is required by the SQL statement.
We've said this a thousand times in the forums: CONVERT THIS STATEMET INTO A PARAMETERIZED QUERY! If you were to release code like this into a production application and sell it, your customers will hang you by your nads when they find out about it!
The SqlParameter objects will handle filtering for SQL Injection attacks for you and handle converting the DateTime objects you supply into the correct SQL format.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi everyone:
I am at present trying to configure a web service but I am having some trouble right from the get go.
When I follow the example, I get an error message telling me "The Web server reported the following error when attempting to create or open the Web project located at the following URL: 'http://thisComputer/WebService1'. 'HTTP/1.1.400 Bad Request'.
I recognize that I have my file servert set up wrong, and that's quite the issue. I can't seem to get just a normal document server up and running as it used to. I think it has to do with a conflict being caused by a SharePoint server I am running. I know that SharePoint filters out your sites so that it can check if they are extended or not.
When I set up a file server using the administration tools and just put a simple index.htm in the folder (or any other default welcome page) I indeed cannot access it.
Can anyone offer any suggestions for my plight?
Thanks a lot!
Jim
|
|
|
|
|
Okay, we got that one working, but now we have been presented with new and fabulous problems. I am trying to reference a com object (which i HAVE referenced).
My code compiles fine.
When i try to instantiate a class from the reference though everything falls to pieces. E.g.
oPPT = new PowerPoint.ApplicationClass();
When I do that it seems to fail. I put the [STAThread] on the method, but that still doesn't work.
Can anyone help me?
Thanks a LOT!
|
|
|
|
|
Just want to have a clear understanding of the following (related) issues:
1. Private/Shared Assembly allows us to have some sort of "binary reuse": for instance, you can create a assembly (either private or shared) which contains some "utility" types, then in another application, you can add a reference to the above assembly and make use of the types in it. Yet you can create another different application still use this same assembly ... we may call these different applications clients, and the utility assembly server.
2. .NET remoting: this architecture allows us to invoke a method on a remote object, again, the remote object can be considered as server, the application who invokes the methods can be view as client.
3. classic COM/DCOM: you can build COM server which has the coclasses, you can also have a client that consume the functions of those coclasses. at run time, the COM runtime (quite like the CLR) will load the COM server so the COM client can have someone to talk to.
So, what exactly is the difference among these three??? for example, the private/shared assembly as a server, it in fact lives in the same AppDomain with its client, but in the .NET remoting model, the client and server are for sure not in the same AppDomain, so this model is about crossing the AppDomain boundaries.
can someone summarize more differences?
|
|
|
|
|
For the .NET Remoting, you can also call into a different machine like with DCOM, but it could also be to the same box too. With .NET Remoting you can specify if you want the communication to use TCP or HTTP, and either binary or SOAP encoding. SOAP encoding is text based so it can slow things down, but can be easier to trace at times.
Steve Maier, MCSD MCAD
|
|
|
|
|
thanks steve, good point. basically, the .NET remoting allows you to customize the whole underlying architecture if you so choose.
by the way, I also notice that you have the MCSD and MCAD certs. congratulations!! would you mind telling me which 3 exams you took for the MCAD cert?
thanks!
|
|
|
|
|
I have taken :
70-320 XML Web Services with C#
70-315 Web Applications with C#
70-300 Analyzing Requirements and Defining Microsoft .NET Solution Arch.
70-316 Windows®-based Applications with C#
Just an elective to go to finish my MCSD.NET.
Steve Maier, MCSD MCAD
|
|
|
|
|
Hi guys,
I have been working on an application in C# and have finally got to the fun stage of creating the help files.
I found the VS Help Integration Toolkit and have installed this and created a simple help 2.0 file with a few html files. The problem is that I now cannot work out how to launch this HxS file in my application.
Any ideas?
Cheers
Mike
|
|
|
|
|
Hey I would like to control the creation of a dataset instance, when i drag and drop it into the designer.
The current designer add a new instance... like so:
this.dataSet1 = new System.Data.DataSet();
in the "Designer generated code" #region.
How do I change this into something I define... FX:
this.dataSet1 = DataSetSingleton.Instance.MyDataSet;
???
I think I need to make a new type converter but im not sure...
|
|
|
|
|
Hello,
I want to add a new row to my dataset, so I use the AddNew() method.
The problem I have is that in my database definition I have defined a default value for some of the fields.
How can I get this default values in my new row?
Thanks
|
|
|
|
|
Hi.
The DataColumn class exposes a DefaultValue property that you should be able to use.
Example:
DataTable table = new DataTable("SomeTable");<br />
table.Columns.Add("Column1", typeof(string));<br />
table.Columns.Add("Column2", typeof(string));<br />
<br />
table.Columns["Column1"].DefaultValue = "Foo";<br />
table.Columns["Column2"].DefaultValue = "BlahBlah";
If you were to execute the code above, then add a row to the table it creates, the row's Column1 value would be preset to "Foo" and the Column2 value would be "Blah".
Hope this helps,
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
This is indeed a solution, but I wanted to avoid putting these default values into my program. That's why I've filled in these values while creating my SQL table.
So I was hoping for a trick to get/read these values into the program.
Can I retrieve default values from a database using Stored Procedures?
Thanks
|
|
|
|