Results 1 to 3 of 3

Thread: Copy error?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2004
    Posts
    541

    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

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Copy error?

    Are there any other files in the folder (the remote one, not your local copy) besides the adt file? The error seems to indicate that there is somekind of supporting file that's missing when you make the copy. It's also possible that there are extra files that are in a different directory on the server that also need to be copied over.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2004
    Posts
    541

    Re: Copy error?

    I thought this could be the case too. But there are other .adt files that are local that my code can access just fine. It's just this one file. The only real difference between this file and the others are the size.

    Right now, I'm doing a very inefficient workaround which dramatically slows down the process. Since I'm able to read the file on the file share, I'm accessing it that way and getting the data. But Due to that location being in another state with a very thin bandwidth tunnel, it's 3 times as slow since I'm reading the file across the network.

    My goal was to copy the file local and process it locally, but I can only open it on the file share.

    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
  •  



Click Here to Expand Forum to Full Width