Alpha Video Training
Results 1 to 4 of 4

Thread: alpha DAO connection string to use variable

  1. #1
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2008
    Location
    Vancouver, BC Canada
    Posts
    560

    Default alpha DAO connection string to use variable

    i would like my DAO connection be coded where the sql server name = a variable.

    {A5API='SQLServer',A5DBVersion=2008,Server='"+sql_server_name+"',A5ANSINullPadWarn=Default,Trusted_connection=yes,Database='logistic'}

    the above string is copied from the "Named Connection String List"

    I AM SPECIFICALLY REFER TO THE "NAMED CONNECTION STRING LIST" shown as part of the Web Component builder routine, where you select a predetermined or build one on the fly, in doing so , i want the server name be represented by a variable.

    Why:

    i have 3 sql servers running, primary, backup and developer copy in my notebook now, if i start developing my web component on my notebook (stand alone), now what? when i attempt to test it in real server, i have to painfully change ip ?
    (my three server has identical structure, field name,table, etc)

    once again, i am not referring to using xbasic to connect to sql, that i can get it to work very well.

    appreciate comment,

    thanks

    Ken tjia

  2. #2
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2008
    Location
    Vancouver, BC Canada
    Posts
    560

    Default Re: alpha DAO connection string to use variable

    any comment?

  3. #3
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: alpha DAO connection string to use variable

    Hi Ken,

    A quick passing thought, build a separate connection string just for testing.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  4. #4
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2008
    Location
    Vancouver, BC Canada
    Posts
    560

    Default Re: alpha DAO connection string to use variable

    Hi keith, yes I know how to code in xbasic for direct connect to sql.
    I use varible for sewrver name, user and password.
    However in dealing with grid, we seem to confined to the use of connection string, which is ok, but when I travel and not connected to my main server, I have backup copy in my notebook that I develop all my web componenent, these componenet once created with a local connection string will not work when I am back on land or connect to my main server.

    Unless som$eone can show me what is the best approach.

Similar Threads

  1. remote alpha db connection string
    By koga101 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 03-31-2010, 07:45 PM
  2. Using a session variable for a connection string
    By Timbo in forum Application Server Version 9 - Web/Browser Applications
    Replies: 2
    Last Post: 09-14-2009, 07:35 AM
  3. Named Connection string
    By urskumark in forum Application Server Version 9 - Web/Browser Applications
    Replies: 0
    Last Post: 11-11-2008, 07:08 AM
  4. ADO vs Alpha DAO
    By jvitello in forum Application Server Version 8
    Replies: 9
    Last Post: 10-19-2007, 05:23 PM
  5. Variable in AlphaDAO Connection String
    By jkletrovets in forum Alpha Five Version 8
    Replies: 4
    Last Post: 06-05-2007, 12:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •