Deleted records when text file is linked as table (#deleted)

Deleted records when text file is linked as table (#deleted)

Post by Daniel McGivne » Thu, 20 Aug 1998 04:00:00



I am trying to attach a text file to an existing access database using the
link method.  I am finding all records with quotes (") in them show up as
deleted when the link is created.  I would like to define the text qualifier
as {none}.  I have search but find no examples of how to do this.
    Below is the schema.ini file and a sample of the code with a record set
example.
    Any help in resolving this would be appreciated.  I have tried to escape
and double the quotes but nothing seems to stop the deleting.

Dan McGivney
Knapp Enterprises


Schema:
[update.txt]
colnameheader=true
format=delimited(|)
CharacterSet=ANSI

connect example
Public Sub Add_Table(Tname, FName)

    ' Check to see if table exist
        For Each td In dbsJet.TableDefs
             If td.Name = Tname Then
                dbsJet.TableDefs.Delete Tname
             End If
        Next
    ' ad table
    Set td = dbsJet.CreateTableDef _
        (Tname)
     td.Connect = _
        "TEXT;DATABASE=C:\Inetpub\wwwroot\text_data"
      td.SourceTableName = FName
    dbsJet.TableDefs.Append td
End Sub

Record set
show_idTitle     Show_Type     Genre1     Year     Actor     Dur
GGLA06     Golfing the Great Lakes     Sport     Golf               30
#Deleted     #Deleted     #Deleted     #Deleted     #Deleted     #Deleted
GHSI01     Gung Ho! Succeeding In A Changing World     Special     Business
90

 
 
 

1. instead of delete trigger delete data from table using execute and temporary table for deleted

Hello,

SQL Server 2k has got me confused...below the instead of trigger that
causes all my problems...below the trigger the explanation of my
problem

===============================================================================
create trigger [triggerConcurrenten] on [dbo].[concurrenten]
instead of delete
as
begin
        -- ***** Declare local vars




        begin transaction

        -- ***** Initialize



        select deleted.* into #deleted from deleted

        /*
        Delete data from concurrenten table using the below sql
statement
        works perfectly.
        =============
        delete
        from concurrenten
        where exists(
        select * from #deleted d
        where concurrenten.[id] = d.[id])
        */

        /* Delete using the execute function fails! */







        begin
                raiserror('[triggerConcurrenten]: Error occured!', 16, 1)
                rollback transaction
        end

        commit transaction      
end

===============================================================================

In the trigger I've tried a 'direct' sql statement to delete data from
the concurrenten table. No problem at all...but when I use the execute
function the exact same delete statement fails...what am I doing
wrong?

Thanx in advance for the answer!

Best regards,

Peter

2. pgsql/doc/src/sgml datatype.sgml func.sgml

3. Deleting records in a table that are linked to a parent table

4. Installing SQL7 SP4 on WinNT 4.0 SP6 -- Where to get Q258437

5. Backup: delete old files / Msdb.backupset records delete

6. Text Fields Length

7. ado .delete deletes joined table records?

8. Can Jdk 1.2 beta 4 talk with Oracle's jdbc oci driver?

9. Error 3167 Record Deleted when there is no deleted record

10. Delete a record from master and linked table

11. Failure to delete records on a linked table

12. Delete record from Linked Table

13. VB5: Deleting records using a text Dbase file...