>>You should be able to set your application name in the sqlconnection. Can you post your connection string you are using?
>
>
>I tried both of them:
>
>lcCstr="DRIVER=SQL Server;Application Name=OZCOM-STEP;SERVER="+Alltrim(M.XServer)+;
> ";uid="+Alltrim(M.XUser)+";pwd="+Alltrim(M.XPassword)+";database="+Alltrim(m.xdatabase)
>
>
>lcCstr="DRIVER=SQL Server;ApplicationName=OZCOM-STEP;SERVER="+Alltrim(M.XServer)+;
> ";uid="+Alltrim(M.XUser)+";pwd="+Alltrim(M.XPassword)+";database="+Alltrim(m.xdatabase)
>
>lcCstr="DRIVER=SQL Server;App=OZCOM-STEP;SERVER="+Alltrim(M.XServer)+;
> ";uid="+Alltrim(M.XUser)+";pwd="+Alltrim(M.XPassword)+";database="+Alltrim(m.xdatabase)
This is a connectionstring I use against a SQL2008 database from VFP9.
gcConnectionString = "Driver={SQL Server Native Client 10.0};server=DELL2800\SQL2008;Database=HeartlandCube;Trusted_Connection=Yes;APP=MDP_using_native_client"
I then create the connection (and just dump the handle to the screen for verification)..
?SQLSTRINGCONNECT(gcConnectionString)
If I execute sp_who2 on the SQL server, my connection will show 'MDP_using_native_client' as the program name.
Depending on the SQL server version, your connection string will be different. Best resource for connection strings is
www.connectionstrings.com.
____________________________________
Don't Tread on Me
Overthrow the federal government NOW!
____________________________________