SQL Server - Not Working solved my mistake

Hi guys!

I’m getting a strange behaviour on a customer’s pc.

It seems that the sql statement for the login is not working because I cannot get any result from the sqlselect…

this is the statement, on my pc works without problems…do you have any idea?

	'Dim db As New MySQLCommunityServer
		'db.port = 3306
		
		Dim db As New MSSQLServerDatabase
		
		db.Host =RipaB2B.host // or just the IP if using the default instance
		db.DatabaseName = RipaB2B.dbnm
		db.UserName = RipaB2B.user  // or "Domain\\UserID for trusted domain accounts
		db.Password = RipaB2B.pass
		
		dim ok_login as string
		dim coduweb as string
		If db.Connect Then
				
				'Dim ps As MYSQLPreparedStatement
				
				Dim ps As MSSQLServerPreparedStatement
				
				
				Dim rs As RecordSet 
				ok_login="N"
				
				// DOBBIAMO VERIFICARE LE CREDENZIALI DEGLI UTENTI WEB EMAIL + CODICE CLIENTE
				// VERIFICHIAMO I DATI INSERITI
				
				ps = db.Prepare("Select IdCli from clienti where Email= ?")
				
				'ps.BindType(0, MYSQLPreparedStatement.MYSQL_TYPE_STRING)
				ps.BindType(0, MSSQLServerPreparedStatement.MSSQLSERVER_TYPE_STRING)
				
				ps.Bind(0, TxtUser.Text.Trim)
				// VERIFICHIAMO I DATI INSERITI
				rs = ps.SQLSelect
				if rs <> Nil Then
						While Not rs.EOF
								IF rs.IdxField(1).StringValue.Trim = TxtPwd.Text.Trim then
										TxtIdCli.Text=rs.IdxField(1).StringValue.Trim
										ok_login="S"
								end if
								rs.MoveNext
						Wend
						rs.Close
				end if
				
				'msgbox(TxtUser.text.trim+"-"+TxtPwd.Text.trim)
				
				// verifichiamo se  un amministratore
				if ok_login="N" then
						if TxtUser.Text.Trim=ripab2b.admn and TxtPwd.Text.Trim=ripab2b.apwd then
								TxtIdCli.Text=""
								ok_login="S"
						end if
				end if
				
				if ok_login="S" then
						// verifichiamo se esiste un ordine in corso
						idrecupero="new"
						qtarecupero="0"
						dim totqta as integer
						totqta=0
						ps = db.Prepare("Select IdOrd, QtaOrd from ordini where IdCli= ? and DataExp='DataExp' order by IdOrd")
						
						'ps.BindType(0, MYSQLPreparedStatement.MYSQL_TYPE_STRING)
						ps.BindType(0, MSSQLServerPreparedStatement.MSSQLSERVER_TYPE_STRING)
						
						ps.Bind(0, TxtPwd.Text)
						// recuperiamo il seriale
						rs = ps.SQLSelect
						if rs <> Nil Then
								While Not rs.EOF
										idrecupero=rs.IdxField(1).StringValue.Trim
										totqta=totqta+rs.IdxField(2).IntegerValue
										rs.MoveNext
								Wend
								rs.Close
						end if
						qtarecupero=totqta.ToText
						ordine.Show
						'ordine.OrdineSel="new"
				else
						msgbox("Verificare Username e/o Password!!")
				end if
				db.Close
		Else
				MsgBox("Connection error:" + db.ErrorMessage)
		End If
  1. does it connect properly ?
  2. does this user have access to the specific DB ?
  3. does this user have select privileges on the tables you’r trying to query ?

there was an issue with the connection string