Showing posts with label invalid. Show all posts
Showing posts with label invalid. Show all posts

Friday, March 30, 2012

how to change the crystal report database location at runtime in vb.net

Hello,

I am using the following codings to change the databse location at runtime. But i found an error 'invalid field name in formula' in some of the reports. The error occurs when we use the databse fields in 'formula field editor' of crystal reports. let me know the reason why its happen? find and send a solution to solve this problem.

Dim logOnInfo As New TableLogOnInfo()
Dim crtableLogoninfo As New TableLogOnInfo()
Dim crConnectionInfo As New ConnectionInfo()
Dim TableLocation As String

Dim vTable As Table
crConnectionInfo.ServerName = gConnServerName
crConnectionInfo.DatabaseName = gConnDatabase
crConnectionInfo.UserID = gConnUserName
crConnectionInfo.Password = gConnPassword

RptDoc.SetDatabaseLogon(gConnUserName, gConnPassword, gConnServerName, gConnDatabase)

For Each vTable In RptDoc.Database.Tables
crtableLogoninfo = vTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
vTable.ApplyLogOnInfo(crtableLogoninfo)
'' vTable.TestConnectivity()
'' MsgBox(vTable.TestConnectivity)
'' MsgBox(vTable.Fields(0).Name())

vTable.Location = Trim(crConnectionInfo.DatabaseName) & ".dbo." & Trim(vTable.Location.Substring(vTable.Location.LastIndexOf(".") + 1))

Next

thank you .
shanthipl reply

Wednesday, March 28, 2012

How to change SQL Server 2005 Server side Collaction?

How to change SQL Server 2005 Server side Collaction?
As the previous staff installed SQL Server 2005 using invalid collaction,
now, We want to change the server side collaction to correct one. How
should I do?In SQL Server 2005 there's a new way of doing this. Please have a look at
"To rebuild system databases and specify a new system collation" in
http://msdn2.microsoft.com/en-us/library/ms144259.aspx
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

How to change SQL Server 2005 Server side Collaction?

How to change SQL Server 2005 Server side Collaction?
As the previous staff installed SQL Server 2005 using invalid collaction,
now, We want to change the server side collaction to correct one. How
should I do?In SQL Server 2005 there's a new way of doing this. Please have a look at
"To rebuild system databases and specify a new system collation" in
http://msdn2.microsoft.com/en-us/library/ms144259.aspx
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com

How to change SQL Server 2005 Server side Collaction?

How to change SQL Server 2005 Server side Collaction?
As the previous staff installed SQL Server 2005 using invalid collaction,
now, We want to change the server side collaction to correct one. How
should I do?
In SQL Server 2005 there's a new way of doing this. Please have a look at
"To rebuild system databases and specify a new system collation" in
http://msdn2.microsoft.com/en-us/library/ms144259.aspx
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com