Thanks. This was the last thing I tried last night, and left the handle out of the SQLExec command!
>>I'm working on an app that will transfer data from a VFP app to SQL Server to be used by another app. I'm trying to make this flexible, since it appears that I might need to replicate this process several times.
>>
>>There are several servers available, and the database is named for a particular client. I have a couple questions:
>>
>>1) I'm using SQLSTRINGCONNECT to make the initial connection. I have the UID populated, but not the PW. When the command runs, I get a SQL Server error about trying to connect. When I close that dialog, I get the prompt for entering password. Is there a way to not show the first error dialog?
>
>SQLSETPROP(0,"DispLogin",2)
>m1 =SQLSTRINGCONNECT([Driver=SQL Server;Server=Boris;UID=sa])
>
>
>
>>
>>2) In the Connection string, I'm selecting MASTER so I can get the available Database names from sysdatabases. Do I have to disconnect and reconnect to select the chosen database? I tried passing a "USE...." in a SQLEXEC, but that didn't appear to work.
>
>?
>it always works for me. What happens if you change you queries always to use that syntax:
>Databasename.schema.TableName, i.e:
>
>SELECT * FROM MyDataBase.dbo.MyTable
>
>
>>
>>Thanks.
>
>Could
(On an infant's shirt): Already smarter than Bush