Support forum
Hello Juan,
The easiest way to link the MessageOut table and the MessageLog table is to use one of the free database fields to add your own unique message ID to the records in the MessageOut table.
In the latest versions of Diafaan SMS Server the best option is the MessageGuid database field, you can fill it with a unique GUID string or any other value. The MessageGuid parameter is not used by Diafaan SMS Server and it is copied without change allong with the rest of the message parameters to the MessageLog table.
Regards, Henk
1:28 pm
Hi, bro can you please tell us the commands or a step by step to do this link between those tables.. Please. Many thanks
You cannot use the same database field name for the index ('Id') field and the UserId ('SMSOutUserId') field. As you already noticed, this results in an SQL error. Instead, you should create a new field in the MessageOut table of your database and set the SMSOutUserId property to the name of this field. You can then add your unique ID to the UserId field when you add a new message to the database and this unique ID will be transferred to the MessageLog table.
If you want to use the same ID in the UserId field as the Id field then you could create a trigger in your database that copies the value of the Id field to the UserId field every time a record is added to the MessageOut table. This is of course only possible if your database supports triggers.
Regards, Henk
6:10 pm
This is great info! This will be useful if I add records into the MessageOut table from another database.
But If I use the MessageOut table as my primary table for adding records, it makes more sense to use the Id-column (index-column) as the userID. Since the column Id is allready used by difaan sms server as the index (to keep track of which record to update as "sent = -1"), then its not possible at the moment to use the same column as userid.
I would like to use the Id-column as the userid, and that is the same column as difaansms server uses for message index. Because of the "duplicated" use of the column id, it throws an error.
Is it possible to use the column Id (the index column of my smsout table) as userid also?
10:41 am
May 28, 2013
Hello Morten,
The record ID numbers of the MessageLog table is auto-generated by the SQL database and cannot be transferred from the MessageOut table.
You can use the UserId and/or UserInfo fields of the MessageOut table to transfer information to the MessageLog table. These two fields are not used by the SQL Connector in Diafaan SMS Server and you can fill them with any information you want.
***
Diafaan SMS Server only matches the delivery report with the original message if the number format is exactly the same. Usually delivery reports use International number format and you should also use that format when you generate the message. You can use the NumberTemplate property in the advanced settings of each connector to change the format of the destination numbers to International number format. In your example the 'NumberTemplate' property should be set to '[+47]########'.
Regards, Henk
9:40 pm
I'm adding records to an sqlserver database into a table MessageOut, with a primary key in the field ID
WHen those records are sent, diafaan sms server changes a field IsSent to -1.
When records are sent, they are also added to a table MessageLog. Delivery notifications etc are written to the table MessageLog.
Is it possible for Diafaan SMS Server to add the ID-number of MessageOut into the table MessageLog? It would make it a lot easier to join two fields in a query with an ID-number to keep track of the status-updates.
***
Is it also possible to receive delivery confirmations when I dont use the full +4791234567, I only use 91234567 in the "to"-field.
Somehow that "not international" number is not recognized when updating delivery confirmation.
Most Users Ever Online: 529
Currently Online:
3 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 679
Members: 0
Moderators: 0
Admins: 1
Forum Stats:
Groups: 2
Forums: 3
Topics: 1154
Posts: 3941
Newest Members:
, Henk HelmantelAdministrators: Henk Helmantel: 1508