mod_offline_odbc for MSSQL

I'm trying to get ejabber to work with MSSQL.

I've changed the SQL in the ODBC modules to work with MSSQL. Everything is working except for the offline messages.

I can see messages going into the spool table, in the correct format, etc. But the client never receives them when logging in, the messages do get removed from the table after the offline user logs in.

I think the issue is somewhere in the "pop_offline_messages" function, but I have no knowledge of Erlang.

Any help would be appreciated.

Tiaan

Does any error appear on the log?

Does any error, or warning, or any strange message appear on the ejabberd logfile when a user with offline messages logins?

MSSQL driver returns number of records affected

No, I did however found the issue, I think.

The code works because the Postgres driver does not return the count of records deleted. Therefore "{updated, undefined}" returns true, but the MSSQL driver does return the number of records deleted. The return value of MSSQL is {updated, } ,

See changes I made to the case statement below, is this correct ?
What does the "_" in "{updated, _}" do / mean ?

-- Current Code --

case ejabberd_odbc:sql_query(
    LServer,
    ["begin;"
     "select * from spool where username='", EUser, "';"
     "delete from spool where username='", EUser, "';"
     "commit"]) of
 [{updated, undefined},
  {selected, ["username","xml"], Rs},
  {updated, _},
  {updated, undefined}] ->

-- Changed Code --

[{selected, ["username","xml"], Rs},
 {updated, _}] ->

Thanks
Tiaan

It is the "anonymous or

It is the "anonymous or don't care variable". From page 25 at the bottom of Concurrent Programming in Erlang, Part I.

--
sander

ODBC Modules for MSSQL

Thank you.

I've managed to get all the ODBC modules to work with MSSQL. We are currently testing. Please shout if anyone want the MSSQL version.

I've noticed that most of the sql in these modules first delete and then insert. Is there a reason for this, why not a update statement ?

Tiaan

Talked to early

I talked to early, it's not working correctly.

The presence does not automatically get send when a user logs on, but if I do a "send presence" in the client, the presence packet does get sent, and the client show the user as online.

I've started debugging, but I'm stuck at the moment. The following functions get called, when a user logs on. But the "in_subscription" "out_subscription" never gets called, am I correct in thinking they must get called ? From where do they get called ?

- New Online -
get_subscription_lists
fill_subscription_lists
process_iq
process_local_iq
process_iq_get
raw_to_record
item_to_xml

Any help would be appreciated.

Thanks
Tiaan

Same for Postgres database

It seems like the same situation occurs with a Postgres database. I've posted a question in the configuration section.

Bug fixed

There was an bug in this module, the fixed version is on SVN.

Would appreciate MSSQL info

I have ejabberd running on Windows 2003 server but would like to change the authentication method to MSSQL. Maybe down the road look to store data in MSSQL as well.

Can anyone provide steps to accomplish this or point me in the right direction? I have been trying unsuccessfully to get it to work.

Thanks for any help...

Mike

I also stuck with MSSQL

I have installed ejabberd on windows 2000 box. I wanted to get it to work with MSSQL. But no luck ... I tried compiling it from sources and followed all the instruction on but all i get are errors... can somebody help me setup ejabberd with MSSQL.
Thanks and regards,
Adarsh

Do you know about the

Do you know about the contributed MSSQL patch?

--
sander

Re

i want to integrate ejabbered with MSSQL .
For this i read link "http://www.ejabberd.im/mssql" In this one script file is not available "http://www.ejabberd.im/files/contributions/mssql.sql" .
I want to use this for jwchat for making chat application with ejabbered and MSSQL Server
Also can i do this with my user table instead of creating new one

Thanks in Advanced
Praj

sander wrote:

Do you know about the contributed MSSQL patch?

--
sander

Integarted MSSQL with ejabberd

Hello
i got success in integrating SQL Server and ejabberd and jwchat. And chat is working properly
But i m not getting the offline messege

Also the Group Chat is not working. When i invite people to join it gives Error Popup This pop Up also comes when i type something in the groupchat window and sent it

Can anybody help me out
Waiting for the reply

Thanks ,
Praj

SQL Server integration with ejabbered 1.1.2

I want to integrate the ejabbered 1.1.2 with SQL Server 2005
Can you give me guides for this
waiting for your reply .

Thanks In advance
Praj

tiaan wrote:

Thank you.

I've managed to get all the ODBC modules to work with MSSQL. We are currently testing. Please shout if anyone want the MSSQL version.

I've noticed that most of the sql in these modules first delete and then insert. Is there a reason for this, why not a update statement ?

Tiaan

Check the section about

Check the section about Microsoft SQL Server in the guide.

--
sander

Unable to get offline status of user as the user logs out

Hi,
I successfully ran the provided SQL Script on my MSSQL Server 2008 and prepared a one to one chat module.
As the user logs in i am getting RosterUser data properly and online status also properly if anyone is logged in.
But when someone logs out I am unable to get the "unavailable" status fired so that i can make the appropriate user in my roster inactive.

The version of ejabbered i have installed is 2.1.6.

Thanks
Rafay.

Syndicate content