Text import ISAM dysfunctional? 
Author Message
 Text import ISAM dysfunctional?

Hi, I hope someone will be able to help me!

I want to process and import data from the body of an e-mail message. I get
the "body text" by linking to my inbox and writing the body to a text file.
I have a linked table to this text file which I process line by line as a
recordset.

My problem: Certain messages link a number of lines into a single record in
the linked text file table. - Same messages - same places, different
messages - different places. 80% of the messages give no hassle. I've
checked that the lines have their "vbCrLf" (hex 0D 0A) - no problem there.
Is it the ISAM? Any solution

Public Function ProcessMSMessages(ByVal msgFrom As String, ByVal msgBody As
String) As Integer
On Error GoTo Error_ProcessMSMessages

Open conFileLocation & conMsgFileName For Output As #1
Print #1, msgBody
Close #1

DoEvents

Dim rstData As Recordset
Dim rstMS As Recordset
Dim qdfOrder As QueryDef
Dim intOrderNo As Integer
Dim strError As String
Dim strOrderNo As String

Set rstMS = CurrentDb.OpenRecordset("Main: Merchant Server", dbOpenDynaset)
Set rstData = CurrentDb.OpenRecordset("Data: Msg Body Text",
dbOpenSnapshot)
Set qdfOrder = CurrentDb.QueryDefs("Update Order Status")

Select Case msgFrom

    rstOrder.AddNew
    rstOrder![OrderReceived] = Now()
    intOrderNo = rstOrder![OrderID]

    'Find Merchant Server ID for new order
    rstData.MoveFirst
    If rstData![dataline] = "From:" Then
      rstData.MoveNext
      rstMS.FindFirst "[MSName] = '" & Trim(rstData![dataline]) & "'"
      If Not rstMS.NoMatch Then

etc.



Sat, 01 Jul 2000 03:00:00 GMT  
 Text import ISAM dysfunctional?

Why not do this direct with the Exchange IISAM instead?

Michael



Quote:
>Hi, I hope someone will be able to help me!

>I want to process and import data from the body of an e-mail message. I get
>the "body text" by linking to my inbox and writing the body to a text file.
>I have a linked table to this text file which I process line by line as a
>recordset.

>My problem: Certain messages link a number of lines into a single record in
>the linked text file table. - Same messages - same places, different
>messages - different places. 80% of the messages give no hassle. I've
>checked that the lines have their "vbCrLf" (hex 0D 0A) - no problem there.
>Is it the ISAM? Any solution

>Public Function ProcessMSMessages(ByVal msgFrom As String, ByVal msgBody As
>String) As Integer
>On Error GoTo Error_ProcessMSMessages

>Open conFileLocation & conMsgFileName For Output As #1
>Print #1, msgBody
>Close #1

>DoEvents

>Dim rstData As Recordset
>Dim rstMS As Recordset
>Dim qdfOrder As QueryDef
>Dim intOrderNo As Integer
>Dim strError As String
>Dim strOrderNo As String

>Set rstMS = CurrentDb.OpenRecordset("Main: Merchant Server", dbOpenDynaset)
>Set rstData = CurrentDb.OpenRecordset("Data: Msg Body Text",
>dbOpenSnapshot)
>Set qdfOrder = CurrentDb.QueryDefs("Update Order Status")

>Select Case msgFrom

>    rstOrder.AddNew
>    rstOrder![OrderReceived] = Now()
>    intOrderNo = rstOrder![OrderID]

>    'Find Merchant Server ID for new order
>    rstData.MoveFirst
>    If rstData![dataline] = "From:" Then
>      rstData.MoveNext
>      rstMS.FindFirst "[MSName] = '" & Trim(rstData![dataline]) & "'"
>      If Not rstMS.NoMatch Then

>etc.



Sat, 01 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Import Text File in database with ISAM driver

2. using isam text driver to open comma delimited text file

3. Updating a text file via TEXT ISAM

4. Incomplete Dates When Importing with ISAM

5. Incomplete Dates When Importing with ISAM

6. import word text to VB text

7. Importing text from Text file- Help needed

8. text ISAM driver re/install problem

9. Help: updating text file-Updating Data in a linked table not supported by this ISAM

10. TEXT ISAM

11. Help with TEXT file and ISAM.

12. ISAM: Reserved error 1070 (ISAM)

 

 
Powered by phpBB® Forum Software