Wednesday, March 21, 2012
How To Change Database Location at runtime When Using Data Environment??
the report always pointing the old path database...
can somebody help me...please?
Btw i'm using CR 8.5 and vb 6 and using data environment as my report data source...Dim crRepp As CRAXDRT.Report
Set crRepp = crApp.OpenReport(App.Path & RptFile)
crRepp.Database.LogOnServer "p2ssql.dll", Server, Database,UserName,
Password)|||Hi, Thanks for replying
i already solved it with :
report.database.setdatasource [dataenv.recordset(must be open)], 3, [table index]
Monday, March 12, 2012
How to call SP of one SQL server from other SQL server
Hi,
In my application environment, we have data will be in available in different SQL servers.
I hava requirement to call the SP of on SQL server from the SP in the other SQL server.
Can any one help me out for a solution which will be faster?
Please note that I cant go for the linked servers as the other SQL severs credentials will be stored in a Database table and it has to be used in run time of the SPs.
Awaiting quick response from you all..
Thanks in advance.
-Thams
YOu can use the openrowset for that:
DECLARE @.USERNAME VARCHAR(50)
DECLARE @.Password VARCHAR(50)
DECLARE @.SQLString VARCHAR(500)
SET @.USERNAME = 'SomeUser'
SET @.Password = 'SomePassword'
SET @.SQLString = '
SELECT a.*
FROM OPENROWSET(''SQLNCLI'', ''Data Source=.;UserName=' + @.USERNAME + ';Pwd=' + @.Password + ';'',
''EXEC Northwind.dbo.[Ten Most Expensive Products]'') AS a;
'
SELECT @.SQLString
EXEC(@.SQLString)
Jens K. Suessmeyer
http://www.sqlserver2005.de