Closed sandyh90 closed 1 year ago
First of all, the adapter is for mysql server. If you are using SQL server, you must create a new adapter for it.
I don't have mssql server. You can copy the adapter file and rewrite the sql codes as the syntax is different.
Ok i will try to create new adapter that can support for mssql server, thank for your advice i will close this issue and if there's have any problem again i will open it again
Hello, I have a problem when using this library this is caused when I use SQL server DB driver, and here is the error that i got.
Problem 1
first, my error is caused by an incorrect "rowcount" because SQL Server has a different way to create an alias column
[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near the keyword 'rowcount'
here source that problem cause https://github.com/n1crack/datatables/blob/f5b5c327df8525d5ff949c6c90a7752c6071df2b/src/DB/Codeigniter4Adapter.php#L53
and I change to this
Problem 2
when i fixed an error caused by problem 1 because create an alias column in the SQL server differently i faced another problem like this
"[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near '`'."
and for this error, I don't know exactly where that problem was caused, but i think this error from this query
Near
*
there have`
both sides i think this error comes from, that was generated from this query($query)t
because that produced from this code
here my debug error for this error maybe can help you
I hope you can fix this error and help me
Reference:
55