[求助]VB中如何用ADO连接远程数据库
VB 中使用ADO控件连接本地数据库,然后在DataGrid中显示出来,代码如下:Adodc1.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
Adodc1.RecordSource = "select Item.Item as 货号,Item.Name as 名称,Store.StoreRoom as 库房,Store.Location as 位置,Item.Specification as 规格,Store.Qty as 数量 from Store,Item where Store.Item=Item.Item and Store.Item='" + Trim(TxtItem.Text) + "' "
Set DataGrid.DataSource = Adodc1
但是用上面的代码访问不了局域网中的其他数据库,该如何设置?
是不是OLE DB还需要连接?
请各位高手指点,谢谢!