sqlserver
12 TopicsPHP PDOStatement::rowCount problem
Hello everyone, I have a problem with the rowCount() in this code: $sqlLoc= "DECLARE @Data2 AS DATE; SET @Data2 = CONVERT(DATE,CONVERT(date, '$dataIncasso'), 102); DECLARE @Data1 AS DATE; SET @Data1 = DATEADD(DAY, $interval, @Data2) SELECT noteincassi.CodLocale,Insegna,Citta FROM [Edera].[dbo].[NoteIncassi],edera.dbo.AnagraficaLocali where DataIncasso=@Data2 AND tipoincasso='6' and AnagraficaLocali.CodLocale=NoteIncassi.CodLocale AND sospeso=0 GROUP BY noteincassi.CodLocale,insegna,Citta ORDER BY Insegna"; $queryLoc=$conn->prepare($sqlLoc,array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL)); //$queryLoc->execute(); if($queryLoc->execute()){ echo $numero=$queryLoc->rowCount(); } $id=0; while($resultLoc=$queryLoc->fetch()){ It will print -1 but the fecth is working and row are returned,so the rest of the code is working fine, it's only the rowcount and I don't understand why. Thank you894Views1like2CommentsSQL-Server - traffic encryption can't connect using only hostname
I have setup a certificate in SQL server configuration manager and can make encrypted connections fine using the FQDN of the server but not if I just use the hostname. I have other servers where I can use either the FQDN or the hostname. Does anyone have any ideas on what I am doing wrong? I've compared the certs of the 'working' and 'not working' servers and can't find a material difference (coz I don't know what to look for...). They are both proper trusted certs and both only reference FQDNs in the subject and SAN fields. Both are for BAG setups and encryption to all the listeners works fine (hostname or FQDN for older server but only FQDN for new server). SQL 2019 standard edition. A VM in Azure The error returned at the client is "A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The target principal name is incorrect.) (Microsoft SQL Server, Error: -2146893022)772Views0likes2CommentsTimeout on SQLserver
Hallo Community, ich benutze SQLServer Express 2014 und verzweifle an der Einstellung des Timeout. In MSSQLSMS ==> In Datenbank ==> Properties ==> Connection Remote connections ist timeout zu 0 gesetzt ==> Beliebig lange Zeit, kein Zeit Limit. Aber die Abfrage (View) wird schon nach ca. 30 Sekunden abgebrochen mit Timeout Fehler. Wie kann ich erreichen, dass SQLserver so lange dran bleibt bis ein Ergebnis vorliegt und wenn es eine Stunde dauert. Danke und Gruß Peter827Views0likes2CommentsSQL Server - Start With Powershell
When I expand "Integration Services Catalogs" and then right-click SSISDB in SSMS and select "Start Powershell", I get this message. I placed {instance} in place of the server name. Any thoughts? cd : Cannot find path 'SQLSERVER:\SSIS\{Instance}\DEFAULT\Catalogs\SSISDB' because it does not exist. At line:1 char:175 + ... grationServices[@Name=''{Instance}'']/Catalog[@Name=''SSISDB'']'|cd} + ~~ + CategoryInfo : ObjectNotFound: (SQLSERVER:\SSIS...Catalogs\SSISDB:String) [Set-Location], ItemNotFoundE xception + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand766Views0likes0Comments