Cannot connect to SQL2008R2 DB

cirollo

Active Member
Licensed User
Longtime User
Hi Erel!
in the past years, I've made a winCE app for collecting data that worked on sql2005.

The customer has changed the main server, coming up with a fresh installation of SQL2008R2.

I remembered that the connectiong sting doesn't work if there's an istance while works on the main instance.
By the way, I'm not able to connect to the db.
I've also tried to install the SQL on my laptop and launch the app (the windows exe generated) from the same pc without results.

the code I used is:
B4X:
Sub SQL_Connection
   'apro la connessione con il db remoto
   stringaconn="Persist Security Info=False;Integrated Security=False;Server="&SVR &",1433;initial catalog=" &DBN &";user id="&USR &";password="&PWD&";"
   '   stringaconn="Data Source=192.168.7.201,1433;Network Library=DBMSSOCN;initial catalog=" &DBN &";user id="&USR &";password="&PWD&";"
   '   Msgbox(stringaconn)
   Sql1.New1
   If Sql1.Open(stringaconn) Then
     LblDb.Visible = True
     LblDb.Width = 230
     LblDb.Text = "Server: "&SVR&":1433 - DB: "&DBN&" ("&AZI&")"
   '     Msgbox("Conessione al DB Stabilita con Successo!!!","My First Program",cMsgboxYesNo,cMsgboxHand)
   Else   
   '       Msgbox("Impossibile Connettersi al DB!!!",progname,cMsgboxYesNo,cMsgboxHand)
   '     Msgbox(sql1.LastError,"")
     Msgbox("Impossibile Connettersi al DB!!!")
     main.Close
   End If
End Sub



any idea?
 
Last edited:

cirollo

Active Member
Licensed User
Longtime User
Hi Erel! I already use B4A and B4i but I need this for datalogic app.....
 

mjcoon

Well-Known Member
Licensed User
I don't remember that there was a library to connect to SQL Server. I think that it is time to switch to B4J for desktop applications or B4A / B4i for mobile applications. Basic4ppc libraries will not be updated.

But there is a library for using a local SQLite file, and I actively use a program I wrote using it for helping with a local charity. But I have had a disk crash and even spending £200+VAT has not recovered my Basic4PPC data. I have found an old "licence.txt" file (which is not text!) but putting it in the folder with a newly-downloaded Basic4PPC have not re-established my purchase key. I have failed to find an old email with the key.

Do you still have a record of my purchase of Basic4PPC (maybe a decade ago!) and could send me the key again so I can maintain my SQL program? (I used to contribute a lot on this forum, as I hope you remember!)

Best regards, Mike.
 
Top