|
in my extended datagridcolumn i press tab , cursor jumps 2 cells :S
I think i can solve this problem with using PreprocessKey message but i dont know how to write code, could anyone show a sample?
|
|
|
|
|
Hi friends,
Am transforming datas from one excel file to another using OleDbReader....
While this,the datas are transferred but the datatypes couldnt be...
How can i do it?
Am using OleDbReader to read the tableschema.....
Kindly Help.....
Thanx....
|
|
|
|
|
i am using com dll in my project which fires up event
code in vb is like this
Option Explicit
Dim WithEvents p As CLAMXLib.ClamEngine
Dim mresult As ClamResult
Private Sub p_OnScanComplete(ByVal result As CLAMXLib.IClamResult)
Set mresult = result
End Sub
in c#
CLAMXLib.ClamEngine p;
ClamResult mResult;
//now how will i catch events
code of class where i have to catch up event
public class clamresults
{
CLAMXLib.ClamEngine p;
ClamResult mResult;
public clamresults()
{
//
// TODO: Add constructor logic here
//
p=new ClamEngineClass();
p.Database.Path="E:\\projects backup\\ankitclam backup\\Clamtest\\database\\";
}
public string loadDatabase(string command,string dirpath)
{
if(command=="SCAN")
{
mResult=scanfile(dirpath);
}
else if(command=="RAWSCAN")
{
mResult=scanBuffer(dirpath);
}
else if(command=="CONTSCAN")
{
mResult=scandir(dirpath);
}
return mResult.Summary;
}
public ClamResult scandir(string dirpath)
{
p.Settings.ScanSupport=ClamSupport.Scan_Standard;
mResult= p.ScanDirectory(dirpath,0,ClamBoolType.False ,ClamBoolType.True);
return mResult;
}
public ClamResult scanfile(string dirpath)
{
p.Settings.ScanSupport=ClamSupport.Scan_Standard;
mResult=p.ScanFile(dirpath,ClamBoolType.True);
return mResult;
}
public ClamResult scanBuffer(string dirpath)
{
mResult=p.ScanBuffer(dirpath,ClamBoolType.False);
return mResult;
}
}
now how and where i will catch up events which will be generated from com dll
Ankit Aneja
"Nothing is impossible. The word itself says - I M possible"
-- modified at 6:23 Thursday 15th December, 2005
|
|
|
|
|
We have a c# object being referred to by ASP.NET application.We want to implement an object pool for the C# component,with the number of intances being configurable.
Assuming that ASP.NET is servicing requests in 25 concurrent threads,we want the services to be processed by the instances from the pool.
Moreover ,the instances are initialized right at the beginning.How do we implement this object pooling?
We need this architecture as the c# object contains a handle to a COM component which has a very expensive initialization process.
A pointer to a reference article will be very helpful
|
|
|
|
|
|
Dear All,
Dear All,
I made a webservice, which takes more than 70 seconds to compute something. When I simply run the webservice it returns me the result. But when I access it through application(C# window), it raise TIMEOUT exception.
I also tried via increasing the timout value for sessionState element but not able to solve the problem.
With Regards
Manoj
|
|
|
|
|
Change the timeout for the object that handles the webservice call. It's the timeout for the web request, not the session timeout.
---
b { font-weight: normal; }
|
|
|
|
|
Dear Guffa,
I tried by increasing the
httpRuntime's executionTimeout to 1300, still its not working.
Thanks & Regards
Manoj
|
|
|
|
|
No, not the execution timeout, the web request timeout.
---
b { font-weight: normal; }
|
|
|
|
|
Dear Guffa,
Thanks you a lot for giving the solution. Actually your First reply given the solution, which I had not understood . Now I got what you were saying.
I am really sorry, i was not able to understand.
Thanks Thanks you a lot for the solution
Manoj
|
|
|
|
|
i need example in C# + SQL SERVER
i want to insert into the DB date and time
for example 12/15/2005 and time 10:05 AM
how can i define the sqlcommand
and lets say in the DB table test i have the colum d as datetime and
t as timestamp
eyalso
|
|
|
|
|
string ins = "insert into table values('" + "2005.12.15 10:05 AM" + "')"
SqlDataAdapter da= new SqlDataAdapter (ins,SqlConnection);
replace DateTime with varchar ur column in ur table
Regards
-- modified at 4:51 Thursday 15th December, 2005
|
|
|
|
|
seferi wrote: replace DateTime with varchar ur column in ur table
Thats easily the worst advice ive read here! DONT use varchar to store a date!
Also, to THE OP - Timestamp is a special type of binary column, and is not used to store time as the name does imply. To store date and time just create a Date column, which will store a date and time perfectly.
Remember to use parameterized queries (for dates especially as the command will take care of inserting the date correctly)
|
|
|
|
|
Instead of storing a DateTime variable store a long (8 byte).
convert the DateTime variable to a long by:
DateTime A = <sometime>;
long B = DateTime.Ticks;
in order to convert the long number back to DateTime do:
DateTime AA = DateTime.MinValue + TimeSpan.FromTicks(B);
Enjoy
Gilad.
|
|
|
|
|
Hi friends,
Am transforming datas from one excel file to another using OleDbReader....
While this,the datas are transferred but the datatypes couldnt be...
How can i do it?
Am using OleDbReader to read the tableschema.....
Kindly Help.....
Thanx....
|
|
|
|
|
Hi,
I was wondering how a c# application can be installed and ran from a server. Allowing the application to be shared among a networks client pc's. The application i created contains registry information required for program execution.
Thanks for any help
Brian
|
|
|
|
|
In a textbox a date is entered.
How can you check if this is a valid date or infact a date at all?
Thanks
|
|
|
|
|
i believe u can do this with regex though im cluless what its coresponding regex term is. try to google it
Aim small, miss small...
|
|
|
|
|
You can do that quite easily by writing your code inside a try/catch block like below:
try
{
DateTime <code>tmp</code> = DateTime.Parse(this.textBox1.Text);
}
catch (Exception exc)
{
MessageBox.Show("This is not a valid date\n\nError Message: " + exc.Message);
return;
}
MessageBox.Show("Date is valid");
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
Dear all:
How could I add a TextBox control into a ToolBar control in VS.NET 2003? The purpose is to generate a toolbar which is like the AddressBar in IE.
Please give me a hand. Thanks a lot.
Andrew
-- modified at 5:40 Thursday 15th December, 2005
|
|
|
|
|
Right click in WindowsForms then click Add/Remove Items, the window Customize Toolbox appear then find TextBox and check it finally click OK button.
I dont know if this is answer of ur question, cuz i wasnt understand clearly ur question.
Hope this helps u
-- modified at 4:37 Thursday 15th December, 2005
|
|
|
|
|
Hi friends,
the follow code will be run normally in WindowsApplication:
string userName = "a";
string userPass = "a";
string address = "192.168.18.145";
int port = 8080;
WebProxy myproxy = new WebProxy(address , port);
NetworkCredential credentials = new NetworkCredential(userName, userPass, null);
myproxy.Credentials = credentials;
WebRequest rqt = WebRequest.Create("http://www.google.com");
rqt.Proxy = myproxy;
rqt.PreAuthenticate = true;
//in SmartDeviceApplication,,the follow sentance cause exception
WebResponse rsp = rqt.GetResponse();
System.IO.Stream stream = rsp.GetResponseStream();
System.IO.StreamReader reader = new System.IO.StreamReader(stream);
this.textBox1.Text = reader.ReadToEnd();
stream.Close();
reader.Close();
but in the SmartDeviceApplication,,it will cause the problem :
The response did not contain an end of entity mark.
Can you tell me why and how to solve the problem??
Thank you !!
|
|
|
|
|
hello!
my friend and I are searching for an example code for getting an bluetooth connection from pc to pda.
because we are having trouble finding an good explanation is there anybody who can help us?
thanks
daniel
|
|
|
|
|
hello all,
i have two window forms. one is having button and second is having listbox on it.when i click on button i want some string value to be add in listbox which is on another form at run time.
i have tried with following way.
make the listbox control specifier as public
make an object of the listbox control in button page e.g pg.
pg.listbox1.items.add("hello"); on button click
but items are not added into the listbox at runtime .plz help me out how can i solve this problem
Amit Grover
CDAC R&D
Gist Group
pune
|
|
|
|
|
There is an article on Passing values between forms[^]
Does that help?
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
-- modified at 2:28 Thursday 15th December, 2005
|
|
|
|