|
Hi Roni,
Coincidentally I have just finished my Access DB Creator and run the first test against the Access DB, which works fine, but I am only testing against Starters at the moment.
With regard to your problem of the double entries, you have correctly identified the problem.
I know the answer, but am not 100% sure of the best place to put the code at the moment. Will get back as soon as I've had a think and tested it.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
OK got it.
For each of your UserControls (mainsUC etc) open the whateverUC.designer.cs file, locate the Dispose() method and alter it to look like this:
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
foreach (ItemSelectedEventHandler eventDelegate in ItemSelected.GetInvocationList())
{
ItemSelected -= eventDelegate;
}
components.Dispose();
}
base.Dispose(disposing);
}
This should clear it up.
Shout out for anything else.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi Henry
I just came back from work.
I have modified the Dispose method as you suggested, but still not working proper,
now actually it triples the items on the list view...
kind regards
roni
|
|
|
|
|
That's strange, it works for me.
Still, never mind.
A few messages ago I suggested that it would be better to have just one UserControl and add the buttons dynamically. Well, I've gone further than that. I've dispensed with the user control(s) altogether.
I've also made some other 'improvements'.
I was just uploading the new version when your message arrived. You can download it from here[^].
It is working against an Access Database
FoodTable: FoodID SmallInt, FoodName Text(30), FoodType Text(15), FoodPrice Currency
DrinkTable: DrinkID SmallInt, DrinkName Text(30), DrinkPrice Currency
Although I have not implemented the Drinks bit yet, you should be able to do that by using the same techniques as for the Food.
Let me know what you think.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
are you still gonna be online wile i ulter the database
|
|
|
|
|
For about the next hour.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
ok, if you still online, I will let you know what happend ok
if not i will talk to you again next time
kind regards
roni
|
|
|
|
|
Hi Henry
Can you help me with something
The application that you send it to me I opened and u set it up the database like that
connBuilder.Provider = "Microsoft.Jet.OLEDB.4.0";
connBuilder.Add("Jet OLEDB:Engine Type", "5");
I'm using Access version 2007...
Microsoft.ACE.OLEDB.12.0
And also how do I set
connBuilder.Add()
since I'm using access 2007 version...
Please let me know how can I set that...
Kind regards
Roni
|
|
|
|
|
I used the OleDbConnectionStringBuilder because at the time I thought that I might use the individual parts later. As it turned out I didn't.
You can either use the 'standard' connection string that you would normally use, or if you think that the builder might be useful you can use the constructor that takes a ConnectionString as a parameter.
string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False;"
OleDbConnectionStringBuilder connBuilder = new OleDbConnectionStringBuilder("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False;");
You have to remember that the ConnectionString will be different for nearly every person/computer and really makes no difference to how the program works, so long as it enables you to connect to the database you want.
So either do as I suggest above or just do what you normally do.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi Henry
It gives me an error
Sort string contains a property that is not in the IBindingList.
line code is this...
MenuBS.Sort = "FoodName";
|
|
|
|
|
The only thing that springs to mind is that you have used a different field name in your database, maybe "Food_Name" or Foodname" (lower case 'n'). Something simple like that.
Have a check. If you cannot find the cause then comment out the line and the 'try', the '{' and all of the '} finally { blah }' bit.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi Henry
Can I ask you something
How about I send you my Project complitely
Only if you want to
If so, you need to tell me how to upload
Roni
|
|
|
|
|
That would be fine.
I use this[^].
Just download and install it. When it is installed right click the tray icon and choose 'Open Dropbox folder'. When it opens you should see a 'Getting Started.pdf', read that.
Then if you double click the 'Public' folder there is a 'How to use the Public Folder.rtf' file. Open that in Word, or almost any Word Processor and read it too.
Then you should be good to go.
I assume that you have a zip program. If not shout out and I'll point you at one.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
is it good idea to use this, what i mean is that
i dont want other people to have accses and download my project
appart from you
roni
|
|
|
|
|
1. Only people that know the url can download it.
2. If you use it, put the address in a message, I will download it, tell you straight away, and you can delete it.
But you are right to be cautious.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
can i have your e-mail address and sendit to you
if you dont mind please
|
|
|
|
|
I was thinking maybe I should zip my folder and then email it to you
|
|
|
|
|
If you want to do that. That's fine. Have you still got my email address from the earlier message?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
Henry is this your xxxxxx
hfam at live stop co stop uk.
|
|
|
|
|
Yes
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
give me few minutes im sending to you by e-mail
|
|
|
|
|
Hi Henry
I think you have an email check it out
Roni
|
|
|
|
|
I have it.
I will not be able to look at it until tomorrow though and what with it being so near to Xmas I'm going to be busier than usual, so please be patient.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi Roni,
Before I go to bed, I noticed while unzipping your project that there is a Login/Logout Form. Will I need a password to run the program? If so you'd better email that to me too.
Good night, I'll speak to you some time tomorrow.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|