|
-
Feb 5th, 2008, 07:26 AM
#1
Thread Starter
New Member
[VB.NET/Crystal Reports] Table cannot be found problem
hello!
i have encountered an exception that says "Table cannot be found".
テーブルが見つかりませんでした。 System.Runtime.InteropServices.COMException (0x800002C5): テーブル 'OKKC401P_PRT' が見つかりません。
ファイル C:\DOCUME~1\irvin\LOCALS~1\Temp\Okkc401 {188FDE00-417D-4CF6-B50A-E54D082E8BFF}.rpt のエラー :
(sorry its in japanese though)
and my code looks like this:
logOnInfo = REPORT.Database.Tables.Item("OKKC401P_PRT").LogOnInfo
Dim crDatabase As Database
Dim crTables As Tables
Dim crTable As Table
Dim connectionInfo As New ConnectionInfo
crDatabase = REPORT.Database
crTables = crDatabase.Tables
connectionInfo = REPORT.Database.Tables.Item("OKKC401P_PRT").LogOnInfo.ConnectionInfo
connectionInfo.DatabaseName = Server
connectionInfo.ServerName = Server
connectionInfo.Password = Password
connectionInfo.UserID = username
For Each crTable In crTables
logOnInfo = crTable.LogOnInfo
logOnInfo.ConnectionInfo = connectionInfo
crTable.ApplyLogOnInfo(logOnInfo)
Try
REPORT.Database.Tables.Item(crTable.Name).Location = username & "." & crTable.Location
Catch ex As Exception
Log_File_Up("setDatabase", ex.ToString)
End Try
Next
ive checked the connectivity of the crTable and it returned TRUE, i guess a success. but when the location is assigned, I get the error above.
anybody who has a solution for this one.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|