INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

TPS txt field to SQL Blob,Binary

TPS txt field to SQL Blob,Binary

(OP)
I am trying to enter data into a SQL file from a TPS File.
I am getting an error where I am copying the data from the TPS field to a SQL BLOB, Binary.

The file structure of the SQL file was created with the import function in the dictionary editor.
All of the other data is copied just fine, but I can not figure out how to copy the data from
a text field into the BLOB.
The error occurs on this statement.

MGasSQL:FIRST=CUS:FIRST <------ Error occurs Here Expecting Variable?

Thank you in advance for any help that you can give.
Robert

File Structures
-------------------------------------------------------------
CUSTOMER FILE,DRIVER('TOPSPEED'),NAME('Customer'),PRE(CUS)
KeyAddress KEY(+CUS:STREETADD),DUP,OPT,NOCASE
KeyWID KEY(+CUS:WID),OPT,NOCASE
KeyGID KEY(+CUS:GID),OPT,NOCASE
KeyID KEY(+CUS:ID),NOCASE,PRIMARY
KeyLast KEY(+CUS:LAST),DUP,NOCASE
RECORD RECORD
ID DECIMAL(7,0)
WID DECIMAL(7,0)
GID DECIMAL(7,0)
FIRST STRING(15)
INIT STRING(1)
LAST STRING(30)
ADDRESS STRING(25)
STREETADD STRING(30)
CITY STRING(15)
STATE STRING(2)
ZIP STRING(10)


END
END

MGasSQL FILE,DRIVER('ODBC'),OWNER('SQLite3 Datasource'),NAME('MGasSQL')
FIRST BLOB,BINARY
LAST BLOB,BINARY
ADDRESS BLOB,BINARY
NOTE BLOB,BINARY
record RECORD
ID LONG
GASID LONG
METER LONG
PREAD LONG
CREAD LONG
PREUSED LONG
USED LONG
END
END

Code
----------------------------------------------------------------------------------

LOOP 10 times
NEXT(Customer)
IF ErrorCode() = 33 THEN BREAK END
If UPPER(CUS:BORR)<>'I'
Clear(MGasSQL:Record)
MGasSQL.ID=CUS:ID
MGasSql.GasID=CUS:GID
MGasSql.Meter=CUS:GasMeter
MGasSQL:FIRST=CUS:FIRST <------ Error occurs Here Expecting Variable?
!MGasSql.Last=CUS:LAST
!MGasSql.ADDRESS=CUS:Notes
GAS:ID=CUS:ID
Set(GAS:KeyID,GAS:KeyID)
Previous(GASHIS)
Message('GGAS:CREAD ' & GAS:CREAD)
MGasSQL.PRead=GAS:CREAD
MGasSQL.PREUSED=GAS:USED
APPEND(MGasSQL)
IF CheckError() THEN RETURN END
count += 1
DISPLAY(?Count)
End
END

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close