Toad World® Forums

Oracle SMS?

I wish to save my SMS messages into Oracle 9i using Ozeki NG SMS Gateway and this method ozekisms.com/index.php?owpn=166 Based on Oracle create table script it seems that it will work but I get some characters incorrectly in the table. Did anyone try it?

Oracle create table script:

CREATE TABLE ozekimessagein (
id int,
sender varchar(30) default NULL,
receiver varchar(30) default NULL,
msg varchar(160) default NULL,
senttime varchar(100) default NULL,
receivedtime varchar(100) default NULL,
operator varchar(120) default NULL,
msgtype varchar(160) default NULL,
reference varchar(100) default NULL
);

CREATE index index_id1 ON ozekimessagein(id);

CREATE SEQUENCE X;

CREATE TRIGGER ozekimessagein_auto BEFORE INSERT on ozekimessagein
for each row
when (new.id is null)
begin
SELECT x.nextval INTO :new.id FROM DUAL;
end;
/

CREATE TABLE ozekimessageout (
id int,
sender varchar(30) default NULL,
receiver varchar(30) default NULL,
msg varchar(160) default NULL,
senttime varchar(100) default NULL,
receivedtime varchar(100) default NULL,
operator varchar(120) default NULL,
msgtype varchar(160) default NULL,
reference varchar(100) default NULL,
status varchar(20) default NULL,
errormsg varchar(250) default NULL
);

CREATE index index_id2 ON ozekimessageout(id);

CREATE SEQUENCE Y;

CREATE TRIGGER ozekimessageout_auto BEFORE INSERT on ozekimessageout
for each row
when (new.id is null)
begin
SELECT y.nextval INTO :new.id FROM DUAL;
end;
/