Support forum

Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_TopicIcon
"Link" between MessageOut and MessageLog
sp_NewPost Add Reply sp_NewTopic Add Topic
September 25, 2017
9:35 am
Henk Helmantel
Admin
Forum Posts: 722
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

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

September 24, 2017
6:10 pm
Morten
Guest
Guests

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?

September 24, 2017
10:41 am
Henk Helmantel
Admin
Forum Posts: 722
Member Since:
May 28, 2013
sp_UserOfflineSmall Offline

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

September 22, 2017
9:40 pm
Morten
Guest
Guests

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.

Forum Timezone: Europe/Amsterdam

Most Users Ever Online: 494

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 431

Members: 0

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 3

Topics: 644

Posts: 2207

Newest Members:

, Henk Helmantel

Administrators: Henk Helmantel: 722