|
You're doing it again. In your test() method you still have this:
public void test()
{
Form1 frm1 = new Form1();
frm1.Choices = new string {"aaa", "bbb"};
} Remove the first line, as it is creating a new instance of Form1 , and refer to the instance that you've stored locally from the constructor call (called _frm1 i think?).
Cheers,
Will H
|
|
|
|
|
Thanks, I've thinked after creating properties I can access it so
but then I dont understand what is the advantage of using properties to access controls? Because in this case its look like the same, but through property.
|
|
|
|
|
|
Thanks. Very good article.
|
|
|
|
|
hi,
i'm a beginner in c# & SQL server 2000, and i did a project with them but i need to make an .exe file that don't force the user to have sql or any thing else.
just to run the exe and he can use the project.
thanx
|
|
|
|
|
If you want to embed the database in your setup program then SQL Server isn't going to work for you. As the name suggests it is a server product. There is MSDE which can be distributed with your application but I think it is still a separate install.
You might want to consider something more along the lines of Vista DB[^]
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
|
emran834 wrote: Is that you meant My application will be running stand alone in the user's computer or The user must have SQL server installed !!
The latter, SQL Server must be installed.
emran834 wrote: Whenever i build my solution, the RELEASE Folder is Stand Alone and My .mdf file is inside the RELEASE Folder which made sense to me that it will run stand alone. Ain't I right ?
No, that isn't right. The database file is useless without SQL Server to open it and server data from it and allow changes to it. In your application you never access the file directly. SQL Server is the only thing that accesses the file. Your application accesses SQL Server not the file.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
i don't think that user must have SQL in his PC.
i need a way to let the project stand alone without SQL
am i obvious !!!?
thanx
|
|
|
|
|
moonangel_bio wrote: i don't think that user must have SQL in his PC.
Why do you think that?
If you are deploying SQL Server files to a PC then you musr have SQL Server installed on that PC in order to use the files. You cannot have SQL Server running on another PC accessing its files across the network. The files MUST be local to the installation of SQL Server.
moonangel_bio wrote: i need a way to let the project stand alone without SQL
Then don't use SQL Server.
moonangel_bio wrote: am i obvious !!!?
That doesn't make sense.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
No matter what you use, you can't embed the database in the .EXE. A running .EXE cannot be modified. At the very least, you'll need the .EXE and a database file. To get a working database that doesn't need a server, you'll have to use a file-based DB like Access (Yuk!).
Your SQL Server implementation is useless without an installed SQL Server that the customer can use.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
O my god ! I am developing my Application with SQL Database, thinking that it will be stand alone distributable. Now If I change my Datbase to OLEDB ( Microsoft Access ) ? then will it be stand alone ? I read your previous posting where you said that if I use Access then it will be ok. I am thinking If I just change the database file and Connection String, will be all code be working ? And I hope the SAME SQL will will be working just Parameters sign ( @ or ? )is different, right ?
-- modified at 16:35 Sunday 5th February, 2006
|
|
|
|
|
I don't know much about Access. It used to be (and this is getting on for 10 years ago) that you'd need some additional files installed to use the Access database through ODBC, but I really don't know about .NET. It may be possible.
The SQL is similar but there are differences. You've already spotted the parameter one. Access doesn't support Stored Procedures, so if you have any of them they will have to be re-written.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Hi colin,
thanks for your time.
yes, ADO .NET supports Access and C# Express can help me to use the Access same as SQL. But I have done some research on google and Realized that, If I started with Access, that was a different story, but at the middle of this time of my application development, it will be very hard to go through all Conversion. I was thinking how can i manage SQL database to make Stand Alone. One thing I can do, I can put the SQL Express executable in my installer file so that whenver user install my software, my installer will install SQL server from CD. Or I can learn about MSDE, I got a nice article about MSDE from Code Project, http://www.codeproject.com/cs/database/msdeinstaller.asp[^]
Can you tell me which one is efficient solution !!
Regards,
Emran
|
|
|
|
|
Hi,
I have checked the link VISTA DB that you provided in the last posting. Excellent Solution exactly what I wanted. thanks for the information. Have you used that ?
|
|
|
|
|
I'vw played with it a little, but I've not found a project that I'd use it on - I work mostly with large enterprise applications where the database is arround a Terrabyte in size.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Hello.
I am writing a new component that has a property that gets an Enum type.
I want the designer of the project, that is using my component, to show that property in the Visual Studio Propery Viewer with a drop down property that lets the user select from a list of Enums that are decleared in his project.
How can I do such a thing ? (in C# 2003)
How do I control the Property view of my control ?
Thanks.
|
|
|
|
|
|
hello
how can i making sound & video transfert in my c# or VB.NET application
11111111111111111111111111111
|
|
|
|
|
I have an application that needs to save settings while exiting. In which eveny should i write the code for saving the settings. Does the Form.Closing event tigger when the form was in focus and the user closed it? The UI of my application may not be visible because it runs in the system tray and it is closed from a system tray icon context menu.
|
|
|
|
|
You can also handle the application's ThreadExit or ApplicationExit event. This may be a more robust way of saving your application's settings - I believe (but am not certain) that these events are fired even if the app is forcibly shutdown via the task manager.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
hello folks.
if my user is behind a firewall that only allows connection through port 80 how can i make my application get binary data and respond to the outside world also in binary data through port 80 . How can my application distinguish the binary content coming from http request from internet explorer (suppose the user is currently browsing the internet and opening my client application). How can i distinguish between the data comes from my server and the data comes from any webserver during browsing through port 80.
Thanks Everybody.
Human Knowledge belongs to the world
|
|
|
|
|
Well, you can easily recognise HTTP traffic. RFC[^] for HTTP defines the format of a HTTP header, so you can look for it to identify requests from a web browser.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi,
I am trying to see what i can do with dynamically use with ContectMenu and a Database.
I have build a structure up where the ContectMenu is static and where i hoped to use a database with ToolStripMenuItem, and it works quite ok to add an item with ToolStripMenuItem.DropDownItems.Add(readdba.GetString(1) but do any have an idea on how to get either an index or the name of the Contextmenu field that comes from the database when it is selected?
Cheers,
Marker
|
|
|
|
|
I made a website in asp.net. but now i want to make a program in c# to add news,... in the database but this should be in html format. Does anybody now how i can format a textbox to html.
gtz stijn
|
|
|
|