I must save a file into a SQL Server table and read it back and save it somewhere.
I have tried it in
VB and it works; unfortunately I must use VFP :-(
In VFP I can read the data from the table and save it to disk, but not read data from a file and saving it into a table.
this works in
VB:
Set mStream = New ADODB.Stream
mStream.Type = adTypeBinary
mStream.Open
mStream.LoadFromFile App.Path & "\" & sFileName
rs.AddNew
rs.Fields("descr").Value = sFileName
rs.Fields("image1").Value = mStream.Read
rs.Update
this DOES NOT work in VFP:
loStream = CreateObject("ADODB.Stream")
loConnection.Open (lcConnStr)
loRS.OPEN(lcSQL,loConnection,2,3)
loStream.TYPE = 1
loStream.Open
loStream.LoadFromFile(lcfilename)
loRS.AddNew
loRS.Fields("descr").Value = lcfilename
loRS.Fields("