Yes, you are correct. However, the MessageId for GSM Modems is limited to 256 values (0..255) combined with the destination address of the message. That means that there is a possibility that there are equal MessageId's in the database if you sent more than one message to the same destination address. To be reasonable safe (100% accuracy is not possible) you should only update the last sent message with the corresponding MessageId. The SQL Connector uses the Index value to identify this last sent message but this is not strictly necessary.
Thanks for the info.
Problem with the database I need to use is that they haven't implemented an auto-increment field type that I can use for the index...was thinking that this field might have been populated by the sql connector.
Guess that leaves me with 2 options. either live without delivery notifications, or implement the outgoing messages with the scripting connector?
with the scripting connector skeleton script i can see the 2 event handlers - "OnSendMessageResult" and "OnSendMessageResultUpdate". what would be the correct way to use these? my assumptions are (please correct me if I'm misguided):
After sending with postsendmessage, I can expect the OnSendMessageResult to receive success/fail status of message after it is sent to the appropriate gateway. At this point I'd insert the message data into my Log table.
After a delivery confirmation/fail is received the OnSendMessageResultUpdate handler gets the statuscode, etc. and the messageId is passed in (which is the same as the messageid passed to the prior handler). I can then Update the status code in the Log Table where the messageId matches.
If this is the case and the messageId is unique then I wouldn't need an Index field? and recorded data would be pretty much identical to what's provided in the sql connector Log table?
Without knowing exactly what you filled in The SMS Log and Advanced properties of the SQL Connector and how your database is set up, I can't really tell what the problem is. On the Access your database page of the manual you can find the optimal database table setup for a couple of database server. The best field type for each field depends on your database. Usually the ODBC driver or the database itself takes care of the necessary type translation but this will not always work.
Diafaan SMS Server does not write a value the Index field, the Index field should be a field type that is automatically filled in by the database program for each new record.
I can have a look at the setup if you send your database table layout and the Diafaan SMS Server configuration file to dmsATdiafaanDOTcom. (Select File-Export-Configuration to export the Configuration file).
I've run into an issue using the SQL connector and the SMSLog table.
It appears that there's a problem for outgoing sms when delivery confirmation is enabled, whereby the status code is not updated in the SMSLog table. (although I can see it has been updated in the internal console send log)
I'm getting a DB error "Column MESSAGETIME not found" in the SQL Connector Event log when delivery confirmation is enabled so assuming that the update query is failing.
The column does exist and is given the status code 200 upon initial sending...just doesn't update to 201 after.
I've set all the fields to large string types (although I did also try certain fields with other types)..is this the expected type? as i've also noticed that the 'Index' field is always null.
Most Users Ever Online: 494
Currently Browsing this Page:
Guest Posters: 396
Newest Members:, Henk Helmantel
Administrators: Henk Helmantel: 620