Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim sql As String, mydata As String, mytable As String mydata = "MYSQL" Set cnn = New ADODB.Connection cnn.ConnectionString = &quotrovider=SQLOLEDB; User ID=saassword=123;Data Source=***.***.***.***" cnn.Open上面的星号为数据库IP地址,填上实际IP后,可以连接上,但因为这个IP是电信的动态IP地址,经常变动,所以想将IP地址放在Sheet1.Cells(1,1)里面.但不知上面的语句该怎么修改,请各位帮助.谢谢! |
|
|
|
|
共 1 个关于本帖的回复 最后回复于 2013-7-11 15:07