|
hi all
codeproject is best
i want connect to access db programmatically but .. i will not successfull .. finally i done this operation and i found my problem . that is Dataset object that when i create dataset programmatically ,
i can't connect to db, and when i drog and drop dataset object in design time and specify parameters (like columns,type of it's,...) my program connect to database . how to solve my problem that i create dataset programmatically and my program connect to db ???
please give me a full example with source and db hase password ...
thanks..
codeproject is best ..
|
|
|
|
|
Creating a DataSet at runtime or at "design time" (which really just means that VS writes the code for you - it's still created at runtime) has absolutely no relevance as to whether an application can connect to a database. My guess is that whatever you're doing at design-time is causing your db connection information to be generated as well. If you want a
hdv212 wrote: full example with source and db hase password
then just check out the code that Visual Studio writes for you after you drag and drop a DataSet onto the Form.
Please, don't ever ask for a full source code example. We have our own jobs.
Josh
|
|
|
|
|
i need a program which can give information like
CPU type,cpu utilization, maximum application address, minimum application address, available page file,available physical memory, available virtual memory, size of structur, memory in use,total page size, total physical memory.
|
|
|
|
|
Go this url and find your api :
http://www.pinvoke.net
|
|
|
|
|
In the TAPI3_0 Application Development with C# sample posted here there is an error "compobj.dll is too old for the ole2.dll initialized " when i am trying to call through the modem(Voice Modem).
Are there any solutions for this?
|
|
|
|
|
hi friends,
I have few queries in C#:
1)how to call javascript function from c# function
2)how to pass string arrays from c# function to javascript
and viceversa
3)how to pass arraylist from c# function to javascript
and viceversa
Please help me out...Expecting your reply...
Thanks
|
|
|
|
|
You did not provide any information pertaining to the hosting process and context for the C# code and the scripting engine. Without that I don't know if anyone would be able to help.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
hi mike,
Thanks for your reply.
I have no. of image filenames in sql database.Using C#, I extracted that data and stored in arraylist.Now I want to store this arraylist object in javascript array.
Is it possible? If yes, please send me sample example.
Thanks
test
|
|
|
|
|
foreach (string name in mylist)
{
Page.RegisterArrayDeclaration("listname", name);
} This will emit the following:
var listname = new Array('a','b','c','d',....);
|
|
|
|
|
hi leppie,
Thanks for your reply.
C# code:
ArrayList c_list = new ArrayList();
c_list.Add("d");
c_list.Add("e");
c_list.Add("f");
Javascript code:
var js_list = new Array('a','b','c');
Now I want to know how to transfer arraylist values from C# to javascript(i.e., c_list -> js_list)
Source -> Destination
C# -> javascript
Please help me to sort out this problem
Thanks
|
|
|
|
|
tjpraveen23 wrote: Javascript code:
var js_list = new Array('a','b','c');
you dont have to declare that. reread my post and try it out.
|
|
|
|
|
Hi! I need code of snakes and ladders game in visual C.Net..plz if any one can help me in this game. Plz if u have the compied and debugged code of this game ..kindly send it to me on the following ID
"spoiledpunk143@gmail.com"
If there r any kinda errors in it..even then its Ok ..i'll try to debug them..but kindly send the game code.
wasif naeem
|
|
|
|
|
Why don't you try and write the game youself? If you run in to problems then we can help you.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
I have the following callback function which I am using to update a progress bar. The only problem is, when I change the value of the progress bar, the bar doesnt change It just shoots to 100 when it is done. I have tried using Application.DoEvents(); .
private Int32 CopyInProgress(uint TotalFileSize, uint BytesTransfered, uint StreamSize, uint StreamBytesTransfered, uint DwStreamNumber, long dwCallbackReason, long hSourceFile, long hDestinationFile, long lpData)
{
float t = TotalFileSize;
float bt = StreamSize;
int nPercent = (int)(bt/t)* 100;
percentComp.Text = nPercent.ToString() + "%";
progressBar.Value = nPercent;
Application.DoEvents();
return PROGRESS_CONTINUE;
}
Any ideas why this is happening?
Sean
|
|
|
|
|
Yup, I got an idea.
You are converting a float (bt/t) into an int...then multiplying it by 100.
By definition, when you make it an int in this manner the answer can only be 0 or 100 and nothing in between.
try changing it to:
int nPercent = (int)(bt/t*100);
|
|
|
|
|
Nicely spotted! I was trying to find a reason why the message couldn't have reached the control. Tuh!
Regards,
Rob Philpott.
|
|
|
|
|
Not a problem. Even a crusty old C programmer gets to get one right once in a while.
The rest of the time I'm generally walking around C# and .NET like a complete idiot because so many of the rules have been changed that there's not a lot of advantage to having programmed for 20+ years...LOL.
Score:
Cprogrammers = 1;
WhizKids = INT_MAX;
|
|
|
|
|
Hey thanks a lot
Sean
|
|
|
|
|
i would like to get the text that is written in axwebbrowser in any textbox.or text area
that in the page downloaded..howa can i get it?
i try to use mshtml.HTMLDocumentEvents2_Event.onkeypress
but it doesnot work
|
|
|
|
|
Hello, I'm trying to view a webpage in a WebBrowser using DocumentStream.
The problem is about showing it. If I put the AllowBrowsing in TRUE, I can't see the page, only I see a blank page. If I put the AllowBrowsing in FALSE, I see the page but I can't make click on the links.
I write: webBrowser.DocumentStream = htmlDocument;
in the Load event. I've nothing in the URL property.
It's like the blank page is loading in the WebBrowser.
Any ideas?
Thanks a lot !!!!
|
|
|
|
|
How can we assing my custom event to a third party event;
I am using Secure Black box for PGP projects and in C++ I can do something like
Reader->OnCreateOutputStream = DecryptStreamNeeded;
Where Reader->OnCreateOutputStream is the third party event and DecryptStreamNeeded is mine so when OnCreateoutputStream fires it calls DecryptStreamNeeded.
In C++ the declaration above works.
I want to recreate that in C#
Here is the Third party delegate and event
event TSBPGPCreateOutputStreamEvent OnCreateOutputStream;
public delegate void TSBPGPCreateOutputStreamEvent(TObject Sender, MemoryStream Stream);
Here is mine:
//Delegates
public delegate void MyDelegateDecrypt(same params as above);
public event MyDelegateDecrypt MyDecryptEvent;
Here is my function i want to call
public void MyDelegateDecryptEvent(same params as above)
{
Stream = myDecryptStream;
FreeOnExit = false;
}
And now I'm stuck because at this point when myDecryptor.OnCreateOutputStream fires I want it to be redirected to MyDecryptEvent. So when I did this:
myDecryptor.OnCreateOutputStream = MyDecryptEvent;
and I get a type mismatch.
Willowsword
-- modified at 11:45 Saturday 6th May, 2006
|
|
|
|
|
Probably I'm not getting you but you might search for this (assuming that weird 'removed' actually means 'OnCreateOutputStream'):
myDecryptor.OnCreateOutputStream += new MyDelegateDecrypt(MyDelegateDecryptEvent);
Unbdinging is nearly the same:
myDecryptor.OnCreateOutputStream -= new MyDelegateDecrypt(MyDelegateDecryptEvent);
|
|
|
|
|
Thanks, I will try this.
Willowsword
|
|
|
|
|
Could you give me the code please?
|
|
|
|
|