Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

connection to mssql

Discussion in 'Call Flow Designer' started by GMBİL, Sep 30, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. GMBİL

    Joined:
    Jun 4, 2009
    Messages:
    9
    Likes Received:
    0
    i need to get a number from sql but could not manage
    instance name: SQLSERVER\INSTANCE
    database name: database1
    table: customer
    user: username
    password: password

    i am trying to customernumberid from the table customer and from the database database1 with database instance SQLSERVER\INSTANCE

    customernumberid consists of 2 numbers like 04 or 88 or 52

    I am selecting Database Access Component and trying to figure out the options. What will be the eaxt statement for the options for the above given statements?

    SERVER
    PORT
    DATABASE
    USERNAME
    PASSWORD
    STATEMENT TYPE
    TIMEOUT
    SQL STATEMENT
    PARAMETERS

    Thanks
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,609
    Likes Received:
    126
    Hi @GMBİL

    Please take a look at the following article which explains how to access a database from the CFD:
    https://www.3cx.com/docs/cfd-accessing-database/

    If you use an instance name, you might need to specify a connection string instead of each field separately. Here you have information on how to create your connection string:
    https://www.connectionstrings.com/sql-server/

    Also, please note that fields are expressions, so if you enter a constant value you need to add quotes, and escape some characters like the back slash, so for example to enter the instance name SQLSERVER\INSTANCE you will need to enter:
    "SQLSERVER\\INSTANCE"

    (with double slash)

    If you open the Expression Editor and select the Constant String option, you can enter the plain string and the tool will escape it for you.

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. GMBİL

    Joined:
    Jun 4, 2009
    Messages:
    9
    Likes Received:
    0
    I have managed to connect to database... What i want to learn this time is; we have a java script based ticketing web server. we create tickets for the incidents from the http web site. I can see that via webservice-post component in 3cx i should handle to send some posts to my ticketing web server which is SYSAID. so that users via pbx can create tickets directly. Is there any example for this?
    Lets say after validation in 3cx i want 3cx to that validated number to the server in a query. in SYSAID documentation it seems like with "POST/sr?view={view_name}&type={sr_type}&template={template_id}" we can create a ticket within the database.
     
  4. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,609
    Likes Received:
    126
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.