|
This whole project is for windows mobile as I said before... I've been thinking about whether it would be easier to use a registry file (.reg file) to delete the registry entries that I would need to delete, and then just delete the files with the delete method.
Help please!
|
|
|
|
|
Maybe this can help u :
[^]
Have Fun
Never forget it
|
|
|
|
|
Thanks! I understand it more now. But i need to know is it possible to edit the registry in windows mobile 5.0 through an exe file or do i need to download a refistry editor?
|
|
|
|
|
Hi,
I used sql 2005 as my backend.
How do i check the MAX(of a field) in a table in from C# codes
|
|
|
|
|
if one stores data in a DATATABLE it's easy to see that :
DataTable DT;
DT.Columns.Count;
Have Fun
Never forget it
|
|
|
|
|
|
I think you want to get the max value of a column from a table in sql server?
select max(column_name) from table
You run this as an executescalar in your c#
hope this helps
Bob
Ashfield Consultants Ltd
|
|
|
|
|
is there a way to Listen to all Port's
Like the Ip Case ( IPAddress.Any )??
Have Fun
Never forget it
|
|
|
|
|
I'm using C#, .net2.0 framework and DB2 as my database.
I need to validate a database(DB2) query which is given by the user in the textbox. Please note that I just need to validate not to execute the query(text in textbox). I dont want any third party software and I want to do in .net2.0, ASP.net, C#, DB2
Please share your ideas and solution.
|
|
|
|
|
if you're using any kind of a dataSet u can create a shallow copy of it
and without "Thouching" the original Exe the Qurey for test only
use the try and catch finlly
Have Fun
Never forget it
|
|
|
|
|
thanks for your reply..
Could you please tell me how to do in .net2.0 with c#. If you provide steps or code is very helpfull for me..
Thanks in advance
|
|
|
|
|
Does db2 have the query parse facility like sql server? This allows you to parse the sql without executing. If so then you should be able to wrap it up in a try/catch and display any problems.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
thanks for your reply..
I'm not aware of sql parser in .net.. Could you please tell me how can i get it so that I can test the same with DB2 also..
Thanks in advance
|
|
|
|
|
The parser is not a .net feature, it's a sql server feature - SET NOEXEC ON. By doing this, when you execute your sql it simply parses but does not execute. I don't know if db2 has a similar feature?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Does anyone know how I can encode a string to a CP865 encoded text, (not for example Unicode or UTF8).
What I am trying to do is to transfer a string content as an txt file with CP865 encodeing.
Response.ClearContent();
Response.AddHeader("Content-disposition", "Attachment;filename=Myfile.txt");
Response.ContentType = "text/plain";
Response.Write("This text shall have de Norwegian charset of the CP865 encoder");
Response.End();
Thanks
Thomas
|
|
|
|
|
You can convert to a specific codepage using the Encoder class:
byte[] bytes = Encoding.GetEncoding(865).GetBytes("This text shall have de Norwegian charset of the CP865 encoder");
You may also need to specify the encoding in your response header.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks, it worked great
Here's a example of my final solution, if anyone else ever needs it.
int chunkSize = 10000;
MemoryStream ms = null;
int dataLeft = 0;
try
{
Response.ClearContent();
Response.AddHeader("Content-disposition", "Attachment;filename=Myfile.txt");
Response.ContentType = "text/plain";
byte[] bytes = System.Text.Encoding.GetEncoding(865).GetBytes("This text shall have de Norwegian charset of the CP865 encoder");
dataLeft = bytes.Length;
ms = new MemoryStream(bytes);
while (dataLeft > 0 && Response.IsClientConnected)
{
byte[] currentChunk = new byte[chunkSize];
int currentChunkSize = ms.Read(currentChunk, 0, chunkSize);
Response.BinaryWrite(currentChunk);
dataLeft -= currentChunkSize;
currentChunk = null;
}
Response.End();
}
catch{}
finally
{
if (ms != null) ms.Close();
ms = null;
}
|
|
|
|
|
I'm trying to create a class that will dynamically load an assembly that will
hold a several definitions for structs (used as an interface to an existing application).
My class will then display those structs as strings - display the interface.
I need to load it dynamically since there are several versions of the same interface.
Thx.
|
|
|
|
|
Thats nice. What is the problem you are experiencing?
|
|
|
|
|
How do i do that ?
I know how to display the struct layout.
I know how to load dynamically the assembly.
Let me try and explain my problem:
lets say that i have a class A which can display type S as a string.
S is defined in class B.
I have to reference B or else i get a compilation problem.
but, since B has two versions (1 and 2) i want to load it dynamically.
how do i do that ?
|
|
|
|
|
Nir sheffi wrote: how do i do that ?
Your problem is not very specific. Maybe you need to rethink the design and focus on smaller problem areas.
|
|
|
|
|
but this is my problem !
i want to display a struct that changes between versions of assemblies.
|
|
|
|
|
Nir sheffi wrote: but this is my problem !
i want to display a struct that changes between versions of assemblies.
So what is the problem?
- Does it not load?
- Can you not differenciate between 2 versions of the same type?
- Do you get an exception when you do something?
- Anything else?
|
|
|
|
|
class A
{
void print(B b){....}; // prints type B
}
struct B (ver 1.0)
{
int x;
}
struct B (ver 2.0)
{
int x;
int y;
}
if A does not ref. directly to assembly that holds B we can not compile since A does not know B.
but i want to load B dynamically, so i do not want to ref. B during compilation.
that is my problem.
|
|
|
|
|
Hi everyone!!!
Is there anyone who knows how to retrive photos in the active directory using c#?
|
|
|
|