The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

xQL Metoer SQL


  • Subject: xQL Metoer SQL
  • From: "Neil Frost" <neil@xxxxxxxxxxxxx>
  • Date: Mon, 28 Feb 2005 09:32:16 -0000


OK,

I'm trying to do this another way now.

It seems that editing works with SQL, but in on shot.

My thoughts are then to store the call information as globals, e.g CID,
CallStart, CallEnd etc, then when the call is complete write everything to
xQL in one hit.

Trouble is I'm having trouble with the script... Could someone have a look
at the Complete Case below and tell me if it makes sense... It opens the
record on the monitor but thats it....

Thanks Neil.


case "COMPLETE"
' call completed
sys.value("LINE1_COMPLETE") = now
' start call log
strmsg="Command=OPEN"+chr(10)
strmsg=strmsg+"SQLID=1"+chr(10)
strmsg=strmsg+"SQL=SELECT * FROM [Telephone Calls]"+chr(10)
call
xpl.sendmsg("","TONYT-XQL.MASTER","DB.XQL",strmsg)

' create details
strmsg="Command=ADD"+chr(10)
strmsg=strmsg+"SQLID=1"+chr(10)
strmsg=strmsg+"SQL=SELECT * FROM [Telephone Calls]"+chr(10)
strmsg=strmsg+"Type=O"+chr(10)
strmsg=strmsg+"CALL="+sys.value("LINE1_STARTCALL")+chr(10)
strmsg=strmsg+"COMPLETE="+sys.value("LINE1_COMPLETE")+(chr(10)
if sys.value("LINE1_NUMBER")<>"" then
strmsg=strmsg+"CID="+mid(sys.value("LINE1_NUMBER"),2)+chr(10)
strmsg=strmsg+"FRIENDLY="+mid(sys.value("LINE1_NUMBER"),2)+chr(10)
'sys.value("LINE1_NUMBER")=""
end if
call
xpl.sendmsg("","TONYT-XQL.MASTER","DB.XQL",strmsg)

strmsg="Command=CLOSE"+chr(10)
strmsg=strmsg+"SQLID=1"+chr(10)
call
xpl.sendmsg("","TONYT-XQL.MASTER","DB.XQL",strmsg)

end select



[Non-text portions of this message have been removed]



xPL Links: http://www.xplproject.org.uk http://www.xplhal.com http://www.xpl.myby.co.uk
To Post a Message: ukha_xpl@xxxxxxx
To Subscribe:  ukha_xpl-subscribe@xxxxxxx
To Unsubscribe:  ukha_xpl-unsubscribe@xxxxxxx

xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.