vb连接mysql数据库
text1按command1,将text1的数据存入mysql服务器中的dbset数据库中name表中bkname字段。我用的是vb6.0听说要加mysql驱动,怎么设置...
text1按command1,将text1的数据存入mysql服务器中的dbset数据库中name表中bkname字段。我用的是vb6.0听说要加mysql驱动,怎么设置驱动。vb6.
0的adodc控件的里没有mysql的驱动,怎么办 展开
0的adodc控件的里没有mysql的驱动,怎么办 展开
3个回答
展开全部
ODBC加载.
vb中添加一个Adodc的控件.
Public Function conn() As String
conn = "Provider=SQLOLEDB.1;Password=数据库管理密码;Persist Security Info=True;User ID=数据库管理帐号;Initial Catalog=数据库名;Data Source=计算机名"
End Function
Dim rs As New ADODB.Recordset
Dim con As New ADODB.Connection
Dim sql As String
Set con = CreateObject("ADODB.Connection")
con.Open conn
sql = "select * from Admin where username='" & username.Text & "' and password='" & password.Text & "'"
rs.Open sql, con, 1, 1
vb中添加一个Adodc的控件.
Public Function conn() As String
conn = "Provider=SQLOLEDB.1;Password=数据库管理密码;Persist Security Info=True;User ID=数据库管理帐号;Initial Catalog=数据库名;Data Source=计算机名"
End Function
Dim rs As New ADODB.Recordset
Dim con As New ADODB.Connection
Dim sql As String
Set con = CreateObject("ADODB.Connection")
con.Open conn
sql = "select * from Admin where username='" & username.Text & "' and password='" & password.Text & "'"
rs.Open sql, con, 1, 1
展开全部
Public Function conn() As String
conn = "Provider=SQLOLEDB.1;Password=数据库管理密码;Persist Security Info=True;User ID=数据库管理帐号;Initial Catalog=数据库名;Data Source=计算机名"
End Function
Dim rs As New ADODB.Recordset
Dim con As New ADODB.Connection
Dim sql As String
Set con = CreateObject("ADODB.Connection")
con.Open conn
sql = "select * from Admin where username='" & username.Text & "' and password='" & password.Text & "'"
rs.Open sql, con, 1, 1
conn = "Provider=SQLOLEDB.1;Password=数据库管理密码;Persist Security Info=True;User ID=数据库管理帐号;Initial Catalog=数据库名;Data Source=计算机名"
End Function
Dim rs As New ADODB.Recordset
Dim con As New ADODB.Connection
Dim sql As String
Set con = CreateObject("ADODB.Connection")
con.Open conn
sql = "select * from Admin where username='" & username.Text & "' and password='" & password.Text & "'"
rs.Open sql, con, 1, 1
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你得先下一个dll去吧然后加载上,好像是
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |