|
-
Jun 2nd, 2010, 11:47 AM
#1
Thread Starter
Fanatic Member
Copy error?
Hello all,
I am using the ado.net advantage provider to access a Advantage .adt file. The file is very large (about 2.5 gigs) and is called log.adt. Here is my code:
Code:
Dim conn As New AdsConnection("data source = \\Lombard13\TestSystems\Cobracs\; ServerType=local; TableType=ADT")
'Dim conn As New AdsConnection("data source = C:\VistaCobra\; ServerType=local; TableType=ADT")
Dim cmd As AdsCommand
Dim reader As AdsDataReader
'Dim iField As Integer
Dim counter As Integer = 0
Try
'make the connection to the server
conn.Open()
'create a command object
cmd = conn.CreateCommand()
cmd.CommandText = "SELECT Log.* " & _
"FROM Log " & _
"INNER JOIN Co_Mast ON Log.Co_Code = Co_Mast.CO_CODE " & _
"WHERE Co_Mast.CO_STATUS = 1"
cmd.CommandTimeout = 800
'execute the statement and create a reader to read the results
reader = cmd.ExecuteReader()
'dump the results of the query to the console
While reader.Read()
For iField = 0 To reader.FieldCount - 1
Console.WriteLine(reader.GetValue(iField))
Next
counter += 1
Console.WriteLine(reader.Item(0))
End While
reader.Close()
conn.Close()
Catch ex As AdsException
'print the exception message
Stop
Console.WriteLine(ex.Message.ToString)
End Try
When accessing over the file server (Dim conn As New AdsConnection("data source = \\Lombard13\TestSystems\Cobracs\; ServerType=local; TableType=ADT")) I can access it just fine and read it through the datareader object.
However, if I copy the file to my local machine and run the exact same process using its new location I get an exception:
{"Error 7200: AQE Error: State = HY000; NativeError = 7008; [iAnywhere Solutions][Advantage SQL][ASA] Error 7008: The specified table, memo file, or index file was unable to be opened. Table name: Log AdsCommand query execution failed."}
If I attempt to manually open the file on my local machine it fails saying
"An unknown error occured trying to access Log.adt" This leads me to believe it may be some issue when I copy the file over. I can open the one on the file server manually just fine.
Not sure if this issue occurs when I copy the file over, but is there maybe some other way I should copy this large file to my local PC?
Thanks,
Strick
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
|