Cannot set Application Name in SQLOLEDB connection string

  • I'm looking for a list of OLE DB connection string parameters for SQL Server 2000 (SQLOLEDB provider).

    I'm connecting to a SQL Server 2000 SP3a database from Powerbuilder 8 using OLE DB. I can't seem to get the application name to show up in sysprocesses.program_name. My connection string contains the following:

    PROVIDER='SQLOLEDB',Application Name='MyApp',

    DATASOURCE='MyServer',PROVIDERSTRING='database=MyDB'

    Anybody know the correct syntax/spelling for "Application Name=" ?

    ( An ADO example for VB would be ok )

    Thanks,

    Mike

  • This site is great for getting ADO connection strings to multiple dbs.

     

    http://www.able-consulting.com/ADO_Conn.htm

     

    A better one for applpication name is contained in:

     

    http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q193/1/35.asp&NoWebContent=1

     

    Hope either helps.


    ------------------------------
    The Users are always right - when I'm not wrong!

  • Sometimes applications force the appname to say Powerbuilder etc. and dont allow you to set this attribute, one way round this is to use a file dsn and set the app name in there.


    Phil Nicholas

  • Tried a few combinations and finally found it.

    Syntax is:

    App=application_name

    No spaces between the equal sign. I tried this in a vb package and ms access and both work.


    ------------------------------
    The Users are always right - when I'm not wrong!

  • I am trying this from an Access2003 adp without success.

    strConnect = "Provider=SQLOLEDB.10;Server=Server;Initial Catalog=MyDB;UID=Me;Pwd=Mine;App=MyCustomString;"

    Does the order matter in the connection string?  Any suggestions?

  • Dunno if you've solved this yet, but I'm connecting from PowerBuilder 9 using OLEDB and the following connection string and I'm successfully setting the application name:

    Provider='SQLOLEDB',DataSource='myserver',Database='mydbname',PROVIDERSTRING='App=myappname',IntegratedSecurity='SSPI'

     

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply