View Complete Post
I'm not sure how to structure the code for this but what I want to do is be able to add data to a database, and once this has completed successfully, then email the user to say the details have been added successfully to the database.
I need to:
1. Check that the relevant data has been added into the database then
2. Email the details of the relevant data when completed.
Thanks in advance for your help,
I need a 'Wrapper.cs' file which takes care of the Database connection ( Oracle 10g) where
i can just call the method with my SQL Query
Gridview1.DataSource = SampleWrapper.ExecuteDatatable("THE SQL QUERY");
Plz Post the link if there is any open source !
Thank you for advance.
I created a widows service for mail schedule with c#.net and sql server 2005 and it is working fine for past one year.
now sometimes i am getting the "System.Data.SqlClient.SqlException:
Login failed for user '<UserName>'. Reason: The account is
then i restarted the windows service manually and working.
what is the problem in my sql server connection and how to fix that issue?
Im having a bit of difficulty with some WPF/C#/SQL Server CE code.
I have a WPF User Control with the following line of code in the constructor:
MyDatabase database = new
where MyDatabase is a class generated using SQLMetal.exe from MyDatabase.sdf.
When I added this control to other controls, the application runs fine and I'm able to access my database.
When I try to edit these parent controls, the XAML editor throws the following error:
>The database file cannot be found. Check the path to the database. [ Data Source = D:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\MyDatabase.sdf ]
Why does the XAML editor redirect my DataDirectory to "D:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\" and why does the XAML editor execute my database access code?
How can I fix this so I can use this control in a XAML editor?
I have spent 2 days reading and trying to figure this out and everything i have read and every book I have brought only tells how to read info from a database and how to edit info that is in a database and they all display the data in the database!
I have a page created (getinfo.aspx)
On that page I have a correctly configured SQLDatasource (SQLSource1) (it is set to allow insert, edit and delete).
I have 1 fileupload control uploadUserPhoto
I have 2 text boxes txtName txtPhone txtCity
I have 2 drop down list boxes dropState dropCountry
The 2 drop down list boxes are "binded" to to seperate tables (via 2 other correctly configured SQLDatasource controls 0 but with out permission to insert, edit or delete) and they correctly provide a drop down list for the user to pick from the 51 states and the 200+ Countries. Those work wonderfully).
I also have a Button Control btnSubmitInfo
The table (myFriends) that SQLSource1 is "connected to" has the following columns:Column Name Type Length Nullable userID uniqueidentifier 16 false userName sql_variant 80
my application raises this exception but the file system.data.sqlserverce.dllÃÂ is in the folder of the application, and the version is correct.
do u have any idea about this problem ?
thanks in advance forÃÂ every answer
hello from switzerland !
Lets say you have three buttons, button1, button2, and button3. Three buttons, have 2^3+1 = 9 possible binary states.
Each state will pull and retrieve data from a database based on the combination toggle states of the button. However, not all data exists for every combination. For example:
000 - exists
010 - not exist
011 - not exist
100 - exists
101 - exists
110 -not exist
111 - exists
So now the problem is, how do I design the system so that when a user clicks a toggle button, the remaining possible buttons are either disabled or enabled? I've thought about using a three-dimensional array but the problem is, when I have to add 30 toggle buttons, this looping becomes tediouis as each time a toggle button is clicked, the software has to iterate through every possible combination again to check whether the truth table for that combination exist.
lets say from the above example, the user toggle button 1, which is 001. His next possible choices are 101 and 111. He can NOT choose 011 but the problem is 111 exists but to get to 111 he has to click button3 first, then button2, to get to state 111. Because if he clicks button 2 first, his state becomes 011 and no data will be retrieved.