I have 3 textbox (with entered data), 1 picture which is loaded by the user, 1 Listbox in which you need to select the answer option. How and where to save this data to use it later?
1 answer
I decided to use sql queries in access
string klantId = nametext.Text; //textbox string klantNaam = text.Text; //textbox System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(); conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Database777.mdb;"; conn.Open(); String ticketno = klantId; String Purchaseprice = klantNaam; String my_querry = "INSERT INTO Рецепты([Название рецепта], [Текст рецепта]) VALUES('" + ticketno + "','" + Purchaseprice +"')"; OleDbCommand cmd = new OleDbCommand(my_querry, conn); cmd.ExecuteNonQuery(); conn.Close();
- oneBad connection implementation example. One fine day, the program does not connect to the database and will give you an Exception. Read more about OleDbConnection at the office. Microsoft website . - Egor Trutnev
|
Binding
inProperties.Settings.Default.<variable name>
select the type `* Collection` - and it will automatically save there. - NewView 3:07 pm