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
Showing posts with label vbnet. Show all posts
Showing posts with label vbnet. Show all posts
Friday, March 30, 2012
Monday, March 12, 2012
How To call TRIGGER in VB.net 2005
i hav written a trigger in SQLEXPRESS DB but i dnt knw how to call in vb.net 2005...
Move the source code from trigger to stored proc, create the stored proc with moved code & call the SP from your ADO.NET.
|||You do not call triggers. They fire when the event, it is related to, occurs. Check BOL for more information about triggers.
AMB
Subscribe to:
Posts (Atom)