December 1, 2004 at 3:59 pm
I have a software, through its user interface, which can save a file link in the SQL database. The file is still in the file system.
The table provided by the software is:
-----------------------------------------
Column , Data Type , Length , Allow Nulls
------------------------------------------
NUMBER , varchar , 7
OBJSPEC , varchar , 255
OBJDATA , image , 16 , x
hSec , int , 4
For example, if I have the file C:\text.txt, after I add a link to this file via the UI, one row generated in the database:
NUMBER , OBJSPEC , OBJDATA , hSec
0 , c:\text.txt , <Binary> , 9479
MY QUESTION is how I can add a file link through program with statement. If I uses
INSERT INTO tablename (number, objspec, objdata, hsec) VALUES ('0', 'c:\text.txt'), this results in a dead link. The row in the dababase is,
NUMBER , OBJSPEC , OBJDATA , hSec
0 , c:\text.txt , NULL , 0
Which values should I give to OBJDATA and hSec in my program? What does hSec mean?
Thanks in advance. Please advise.
December 6, 2004 at 8:00 am
This was removed by the editor as SPAM
December 6, 2004 at 8:28 am
Maybe no one can give you the answers to this question because they don't know your software. What I would do is use SQL Profiler to record the commands coming from the software. I use this technique frequently to reverse engineer software used in our firm.
Hope this helps,
Kathi
Aunt Kathi Data Platform MVP
Author of Expert T-SQL Window Functions
Simple-Talk Editor
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply