the thing is if I put both gDevServer and gProdServer on the same server then it work but it doesn't work if I put it on a different server. example Server1 and Server2
gDevServer = gProdServer = "Server1" then it work
gDevServer = "Server1"
gProdServer = "Server2" doesn't allow me to log in access denied doesn't exist etc when I go to crytal report and set database location and give the name to Server2 then it works
If gUserID = "gw" Then
strConn = "Provider=SQLOLEDB.1;Password=king;Persist Security Info=True;User ID=developer;Initial Catalog=trade_dev;Data Source=gDevServer"
Report.Database.LogOnServerEx "pdsoledb.dll", gDevServer, "trade_dev", "developer", "developer", "OLE DB", strConn
Report.Database.Tables.Item(1).Location = "trade_dev.dbo.vwAssetMoneyMarketDailyAccrued"
Else
strConn = "Provider=SQLOLEDB.1;Password=149760uyen;Persist Security Info=True;User ID=vip_trader;Initial Catalog=Trade_prod;Data Source=gProdServer"
Report.Database.LogOnServerEx "pdsoledb.dll", gProdServer, "trade_prod", "prod", "prod", "OLE DB", strConn
'Report.Database.LogOnServer "pdsoledb.dll", gProdServer, "trade_prod", "vip_trader", "149760uyen"
Report.Database.Tables.Item(1).Location = "trade_prod.dbo.vwAssetMoneyMarketDailyAccrued"
End If
gDevServer = gProdServer = "Server1" then it work
gDevServer = "Server1"
gProdServer = "Server2" doesn't allow me to log in access denied doesn't exist etc when I go to crytal report and set database location and give the name to Server2 then it works
If gUserID = "gw" Then
strConn = "Provider=SQLOLEDB.1;Password=king;Persist Security Info=True;User ID=developer;Initial Catalog=trade_dev;Data Source=gDevServer"
Report.Database.LogOnServerEx "pdsoledb.dll", gDevServer, "trade_dev", "developer", "developer", "OLE DB", strConn
Report.Database.Tables.Item(1).Location = "trade_dev.dbo.vwAssetMoneyMarketDailyAccrued"
Else
strConn = "Provider=SQLOLEDB.1;Password=149760uyen;Persist Security Info=True;User ID=vip_trader;Initial Catalog=Trade_prod;Data Source=gProdServer"
Report.Database.LogOnServerEx "pdsoledb.dll", gProdServer, "trade_prod", "prod", "prod", "OLE DB", strConn
'Report.Database.LogOnServer "pdsoledb.dll", gProdServer, "trade_prod", "vip_trader", "149760uyen"
Report.Database.Tables.Item(1).Location = "trade_prod.dbo.vwAssetMoneyMarketDailyAccrued"
End If