Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
like these?
C++
OleDbConnection coldb = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Souri\Documents\Database3.accdb;;Jet OLEDB:Database Password=123;");
coldb.Open();
OleDbCommand command = new OleDbCommand();
command.Connection = coldb;
command.CommandText = "INSERT INTO PhoneBook ([name],[phone num]) VALUES (@param1,@param2)";
command.Parameters.AddWithValue("@param1", textBox_name.Text);
command.Parameters.AddWithValue("@param2", textBox_num.Text);
command.CommandType = CommandType.Text;
command.ExecuteNonQuery();
coldb.Close();
textBox3.AppendText(textBox_name.Text + "       " + textBox_num.Text);
MessageBox.Show("your contact saved successfully");
Posted
Updated 1-Oct-12 18:02pm
v3
Comments
Sergey Alexandrovich Kryukov 1-Oct-12 19:47pm    
Why?
--SA

1 solution

First, Qt. The answer is "yes", but in the following trivial sense: Qt is the framework for GUI development, so it has nothing to do with your code, which looks like ADO.NET. Please see:
http://en.wikipedia.org/wiki/Qt_%28framework%29[^],
http://qt.digia.com/[^],
http://en.wikipedia.org/wiki/Ado.net[^].

Second, NetBeans. The answer is "no", in two related senses of this word. If you mean a platform framework for Java, your code has nothing to do with Java, please see the last link above. If you mean the NetBeans IDE, I never heard it supported .NET, I'm pretty much sure it does not. Please see:
http://en.wikipedia.org/wiki/NetBeans[^],
http://netbeans.org/[^].

And finally, if we also pay attention for the tag "C++", the general answer will be "no" if you really mean "C++", and not "C++/CLI" (most likely, the only one kind of C++ which can be used for .NET), because your code sample is in C#. If you nevertheless mean "C++/CLI", it should be noted that you can easily re-write your code sample into C++/CLI, because a .NET language is a .NET language. Please see:
http://en.wikipedia.org/wiki/C%2B%2B[^],
http://en.wikipedia.org/wiki/C%2B%2B/CLI[^],
http://www.ecma-international.org/publications/standards/Ecma-372.htm[^],
http://msdn.microsoft.com/en-us/library/xey702bw.aspx[^],
http://en.wikipedia.org/wiki/List_of_.NET_languages[^],
http://en.wikipedia.org/wiki/.net[^],
http://en.wikipedia.org/wiki/Common_Language_Infrastructure[^],
http://en.wikipedia.org/wiki/Common_Language_Runtime[^].

As a conclusion, I must note that the question does not make a whole lot of sense, so I tried to answer formally, but in an informative way.

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900