#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    52
    Rep Power
    10

    HyperTerminal Program with DB connection


    Hi,

    i have a device conntced to a serial port and outputing to HyperTerminal program to output all the call made through our PBX.

    Is it possible to design the same with Delphi and output to a DB insted of HyperTerminal?


    Many Thanks,
    Jassim Rahma
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    Originally Posted by jrahma
    Is it possible to design the same with Delphi and output to a DB insted of HyperTerminal?
    Yes, of course. You can do about anything with Delphi.

    hth,
    M.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    52
    Rep Power
    10
    how?


    please help with an example......
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    52
    Rep Power
    10
    Originally Posted by jrahma
    how?


    please help with an example......

    PLEASE HELP
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190

    You don't get it?


    Hello jhrama.

    There is several reasons why noone is replying to you:

    1. You way of asking questions is not acceptable. Few people here are willing to hold your hand. You have to show your own efforts to solve the problem first.

    If nobody replies, do not post the same thing again but ask yourself: "Could there be a reason why noone is replying?"

    2. Another obvious probem:
    You closed some your threads after posting. CLOSED thread can not be replied to
    Moderator log of this one here:
    Thread Closed by jrahma on November 7th, 2004 at 12:12 PM. Thread Closed by jrahma on November 15th, 2004 at 12:49 AM.
    3. I read some of your other posts, all show the same problems

    This information has also been sent to you via PM last monday. I did not get any reply,

    I suggest you read these before posting again:
    vBulletin documentation
    [NEW USERS] - How to post question
    How to ask questions the smart way

    Regards,

    M.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    52
    Rep Power
    10
    Hi,

    Thank you for your reply...

    1. Regading this problem.. I have checked the net and was unable to get a solution... may be because what I wanted is a combination of serial port, mySQl connectivity and PBX.

    2. Closing the thread was my mistake.... actually I was thinking that the option (Close this thread after you submit your message) means close the thread page and return to the forum's index.



    Best Regards,
    Jassim Rahma
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    Originally Posted by jrahma
    Hi,

    Thank you for your reply...

    1. Regading this problem.. I have checked the net and was unable to get a solution... may be because what I wanted is a combination of serial port, mySQl connectivity and PBX.
    Ok, so break it down into smaller pieces:

    Q: How to use the serial port in delphi?
    A: Best would be downloading a third party "serial communication" component if you don't have any yet.

    ...unless you want to use WinAPI and learn all the technical background too. In this case visit: http://msdn.microsoft.com.

    Q: How to connect Delphi to MySQL
    A: Two ways:
    a) ODBC
    Download the odbc driver from mysql.com and follow instructions.
    This is the easier way since you can use any ODBC database example you can find in the documentation or on the net.
    b) native MySQL library
    Get mysql for windows, extract only the mysql.dll. Then you have to either convert "mysql.h" from C to delphi or get a pre-converted one from the net
    This way you get all power over mysql and you can access also the mysql-specific functions.

    Q: How to interpret the data from the PBX?
    A: Post a few example lines of the output in hyperterm, maybe we can help you then.

    I have used all of this, but writing an example for you would take several hours, so unless this is paid work, you probably have to do it yourself.

    hth,
    M.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    52
    Rep Power
    10
    Hi,

    Thank you for your reply..

    This is the output example:

    N 005 00 DN0037 T001000 11/17 12:59 00:00:06 36660624
    where:

    DN0037 is the extension number
    11/17 12:59 is the date and time call was made
    00:00:06 is the call duration
    36660624 is the telephone number


    another example:

    N 008 00 DN0037 T001000 11/17 13:00 00:00:09 0096614779229
    where:

    DN0037 is the extension number
    11/17 13:59 is the date and time call was made
    00:00:09 is the call duration
    0096614779229 is the telephone number


    but in the above case I will have a line before this line indicates which password was used to dial that international call

    example:

    A 007 00 DN0037 T001000 11/17 13:00 04
    DN0037 is the extension number
    11/17 13:59 is the date and time call was made
    04 is the user id (I have a list of users)


    now, I want to know how can get the data directlly to mySQL without HyperTerminal.

    I am an expert in mySQL, so you don't need to explain any thing in mySQL level, it's only the communication level which I am still learning..


    Many Thanks,
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    Originally Posted by jrahma
    now, I want to know how can get the data directlly to mySQL without HyperTerminal.
    I told you the steps, the details are far beyond what I can tell you in a forum...

    I am an expert in mySQL, so you don't need to explain any thing in mySQL level, it's only the communication level which I am still learning..
    "only the communication level"
    ...and this is the hard part because it is programming and you don't seem to any experience yet at all.

    Do you know php or some other language already? Have you ever written _any_ database application with delphi? Any kind of delphi application at all?

    The data seems to be fixed field width, but the last field. One more example is needed: A single digit day / month. Does it fill left with zeros?
    If yes, this is one of the most simple cases of processing data.

    Do you have an idea yet about how to split the string?

    M
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    52
    Rep Power
    10
    Hi,

    Ohhh Please..

    I am have writtent many database applications using Delphi and Visual Basic to connect to mySQL, SQL Server and FireBird.


    I already told you that I have no issue on the database programming level.

    I am also surprise why you think I don't know how to spilt strings?!!!!!!!


    I said that I only have a problem in the communication level, means how to get the same output from the device printed into my Delphi application instead of HyperTerminal..

    I don't think it's wrong when I ask for guide from experts if I never tried a part of the programming (serial port programming) and that's why we have all these forums, to exchange the experience...


    am I right?
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    Originally Posted by jrahma
    Hi,

    Ohhh Please..

    I am have writtent many database applications using Delphi and Visual Basic to connect to mySQL, SQL Server and FireBird.


    I already told you that I have no issue on the database programming level.

    I am also surprise why you think I don't know how to spilt strings?!!!!!!!


    I said that I only have a problem in the communication level, means how to get the same output from the device printed into my Delphi application instead of HyperTerminal..

    I don't think it's wrong when I ask for guide from experts if I never tried a part of the programming (serial port programming) and that's why we have all these forums, to exchange the experience...


    am I right?
    Partly. The problem is that until you posted the above I could not see what your problem is at all. You asked as if you expected somebody to write it for you now and here.
    Since you have written database apps already, you know how much effort is behind such.

    So it is only the serial communication you are having trouble with? I answered this already:
    Q: How to use the serial port in delphi?
    A: Best would be downloading a third party "serial communication" component if you don't have any yet.

    ...unless you want to use WinAPI and learn all the technical background too. In this case visit: http://msdn.microsoft.com.
    Sorry, I am having a hard time understanding you and your problems. I can hardly be of any help to you. I'm outta here, sorry for any inconveniences.

    M.

IMN logo majestic logo threadwatch logo seochat tools logo