MSSQL SQL Server library

jnltw

New Member
Licensed User
Yeah! Almost there. Seemed I had an older version of the DLL, had to play around a little to get it to load the new one and then edit my program (ReadField in stead of Read, Advance in stead of Data and so on).

Now I've lost the messages, program does run on the PDA only won't connect to the SQL server some how. Next challenge!
 

jnltw

New Member
Licensed User
Still not managing to have it access my SQL Database on the server, I verified that my WiFi connection is up and it connects to the server through the same connection on my laptop.

Does anybody have a working example of a program that connects to an SQL server through the MSSQL 1.9 driver from a Windows Mobile 6.5 Professional device? I would like to have a look...
 

agraham

Expert
Licensed User
Longtime User
Last edited:

micro

Well-Known Member
Licensed User
Longtime User
connect two device

Hi to all,
how can I use MSSQL Server between two devices, where one is the server (with database) and one client?
It is possible and how with the Agraham library?

Thanks
 

georgea

Member
Licensed User
Hello Agraham,

After using your library for about 8 months, i get complaints from my customers that my application disconnects from sql server and needs restart.

As i realized it myself, when my application is in idle mode for some time, then the connection with server is lost and must call Mssql.Open method again.

I can't figure out why this happens but as i looked at the SqlConnection Members on MSDN and i saw that a property called State exists and there is also an event called StateChange that is fired when connection state goes from Open to Closed and vise versa.

If you don't have much time to mess with that you could post the source file to examine it myself.

Thank you in advance,

George.
 

agraham

Expert
Licensed User
Longtime User
I guess it only needs the State property, and not the event, exposed so that you can check it before each transaction. If you can't easily, say with a couple of hours work, add it yourself then post here and I will do it. It will only take me about 15 minutes to add it, update the help and repost the dll.
 

georgea

Member
Licensed User
If you have the time to do it, there is no need from me to edit your source file. I am sure you are going to make it better.

I just asked for that because i don't want to bother you every single time i want an additional option to a library :)

Thank you,

George.
 

Tex8503

Active Member
Licensed User
Longtime User
Hey guys,
I trying to use this library - but for some reason when working with MS SQL 2008 I can read and write - and with MS SQL 2005 - I can read, but I can't run INSERT statements to MS SQL 2005 - does this make any sense?

How would I go about finding why this is happening?
 

citywest

Member
Licensed User
Longtime User
Thank you Andrew and others I'm glad this went somewhere, although I'm sorry that I didn't fully test the transactional stuff before posting.

I ended up using something different than Basic4ppc for the project that utilized this library (because of a silly client requirement that I had no control over) so it's been sitting on the shelf ever since, but I'm back as I need to do a lot of Android work for a current project which will ongoing for a long time.

After wasting a lot of time with phonegap and a few others it looks like Basic4android will "fit the bill". So Erel you will receive an order from me shortly :)

To the gentleman whom can't do insert queries it will be the permissions on the database. The user that you are using will have Update queries un-ticked in SQL Management Studio, check both the DB and overall security settings.

Cheers,

Mark S.
 

Tex8503

Active Member
Licensed User
Longtime User
Hey Citywest,
I actually resolved this issue. The problem was the DBA gave me the incorrect table names. So not your fault after all - their development didn't mirror their production accurately.

Sorry about that!
 

citywest

Member
Licensed User
Longtime User
That's great you resolved the problem. You've got to love sys and db admins, it's a bit like extracting teeth or banging 4 inch nails into your forehead at times.

Perhaps if there is enough interest we could take this to another level with SSPI integration and a few other things which will fix a number of difficulties that a few people have had.

Cheers,

Mark S.
 

Rafal Galewski

Member
Licensed User
Longtime User
Basic4Android with MSSQL

Could You send to me a example how to use it MSSQL library for using query in Basic4Android
 
Top