>>Thank you for the great response! The detailed sample was very informative. It turns out that the "Trusted_Connection" clause was keeping me from connecting successfully since I had a user account and password I was trying to use at the same time. I took out that "Trusted_Connection" clause and my code worked like a charm. I didn't realize it was that easy. I will be able to avoid processing an externally generated UNICODE text file entirely! I can just put the data in a cursor and work with it that way.
>>
>>Now I will need to look into how to handle possible connection errors. Everything works as planned if there are no errors and fortunately I haven't had any network or server problems. Any particular sneaky errors I need to look for?
>
>Might be many :) To start check return value of SQLExec (I didn't in code).
>Looks like :
>
>
>if SQLExec(lnHandle, ....) < 0
> CheckError()
>*...
>
>function CheckError
>local ix, lcMsg
>local array arrErr[1]
>aerror(arrErr)
>set textmerge to memvar lcMsg noshow
>set textmerge on
>for ix =1 to 6
> \<<arrErr[ix]>>
>endfor
>set textmerge to
>set textmerge off
>messagebox(lcMsg)
>
>VFP might also give an error before aError content. aError would give more detailed info about what happened and an SQLserver error number as well.
>Cetin
Thanks. Now, is the "to memvar lcMsg" clause of the set textmerge statement a VFP 7 or 8 specific clause? I don't see it in the help for VFP 6.
Larry Huisingh
Lockheed Martin Information Technology
Richland WA USA