Skip to content

Tag: sql-server

Best practice to connect WPF and SQL Server

I have been working using WPF for a while, but due to lack of resources I used Access Files as Databases. Recently I got the opportunity to get my hands on a SQL Database. When I created my WPF Application (a simple data entry, which writes and read from the database) one of the IT guys where I work started

Parameterising an IN clause in PHP with sqlsrv

I have a method which selects records based on an array of integers which works when specifically typed. However, when I try to replace that array with one passed in from the method parameter sqlsrv_query() returns false. I am sure this is something very simple, but the ‘obvious’ possibilities to …

SQLSRV skips a row when returning a query

The code above does what I want and returns number of rows that matches what the query returns. However, I hardcoded the three sqlsrv_next_result($result);. The query will change depending on @AmbassadorID, so that piece needs to be dynamic. I tried the following loop: But this loop skips the first row. How d…