可以将访问权限用作Qt或NetBeans中的数据库吗? [英] can I use access as a DataBank in Qt or NetBeans?

查看:121
本文介绍了可以将访问权限用作Qt或NetBeans中的数据库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

喜欢这些吗?

like these?

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");

推荐答案

首先,Qt.答案是是",但是在以下琐碎的意义上:Qt是 GUI开发的框架,因此它与您的代码无关,类似于ADO.NET.请参阅:
http://en.wikipedia.org/wiki/Qt_%28framework%29 [ ^ ],
http://qt.digia.com/ [ ^ ],
http://en.wikipedia.org/wiki/Ado.net [与Java无关,请参见上面的最后一个链接.如果您是说NetBeans IDE,我从未听说过它支持.NET ,那么我可以肯定它不支持.请参阅:
http://en.wikipedia.org/wiki/NetBeans [ http://netbeans.org/ [ ^ ].

最后,如果我们还注意标签"C ++",那么如果您的意思是"C ++",而不是"C ++/CLI" (通常是仅一种可用于.NET的C ++),因为您的代码示例在C#中.但是,如果您的意思是"C ++/CLI",则应注意,由于.NET语言是.NET语言,因此您可以轻松地将代码示例重新编写为C ++/CLI.请参阅:
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 [
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


这篇关于可以将访问权限用作Qt或NetBeans中的数据库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆