Search the Community
Showing results for tags 'sqlserver'.
Found 7 results
-
DataSnap Could not convert variant of type (Array Byte) into type (Integer)
dlucic posted a topic in Network, Cloud and Web
I have simple DataSnap server application with connection to MS SQL Server and also simple client application. On the server side I have TFDConnection object to connect to MS SQL Server. I also have TFDQuery with simple sql "insert into slika_test (slika) values (:slika)". Param slika is for image datatype in table test_slika. This is properties of Param slika of TFDQuery object Of course, there is DataSetProvider object On the client side I have TSQLConnection and DSProviderConnection object's. I connect to DataSnap server application with them. There is also TClientDataSet object This is code for click on Button I load image from Image1 object on the form into MemoryStream. Than I put that MemoryStream in Param of ClientDataSet object and execute. When I do that for the first time everything goes well. Data is stored in MS SQL table. But when I click it another time and same code executes I receive this error on the server application Any body knows what is the problem? -
i'm converted ADO Connections and AdoQuerys To FDConnection and FDQuerys in MyProject to Improving Connection Quality to MS SQL Server 2012 Database The previous Ado version worked fine in Running Query Commands But in the current FD version, the system hangs most of the time. Cursor Shows Hourglass Icon and Sql Word Below HourGlass Cursor and The program is suspended.so that the user is forced to use the َ Alt+Ctrl+Del keys maybe FireDac Not Compatile with sql 2012?
-
Hello - I recently received a new laptop at work, and, for security purposes, the laptop and my credentials are in a different AD tree than my SQL Server. My laptop is under USDA.net, and the SQL Server is in the tree for the University where our offices are located. I've set up a Windows credential that seems to work, as I can connect my laptop to the SQL Server using SSMS, and I successfully set up a DataSource in ODBC using the 'ODBC Driver 18 for SQL Server'. I just have to make sure that the 'Trust Server Certificate' box is checked. However, when I place & test an TFDConnection to my SQL Server in Delphi, I'm receiving the message: The system cannot contact a domain controller to service the authentication request. Please try again later. To mimic the 'Trust Server Certificate' setting, I've added TrustServerCertificate=yes to the ODBCAdvanced setting in the FireDAC Connection Editor. [I get a '...certificate chain not trusted...' error when I omit that]. The connection seems to work for everything except FireDAC, and I'm at a loss as to what to do next. Any ideas?
- 12 replies
-
I am using an old version of FireDAC (Berlin time frame) and when opening an updateable query it implicitly calls sp_pkeys which can take ~1.5s to return. It seems to do so only once and then caches the PK info for the table appearing in the SQL FROM clause. Grepping the source has yielded no information, and my Google fu is failing me. Depending on the use case, this sometimes results in poor performance. For instance if the user fires up the app and goes into a screen to update some data and then closes the app, they trigger all of the metadata queries during their usage. Over slower VPN connections this can be a real problem. It would be nice to be able to prevent FireDAC from making such a metadata call. Can we specify the PK column at design-time or run-time and prevent the metadata query? After all the database PKs seldom change.
-
good morning every one ^^... TListView Paging**** is this look logic to you ? a mobile app + rest . I want to be able to get 10 record every time . so how about putting the last record i get every time and send it back to the server side to get 10 more record starting with it ,,,,and so on ... is this look ok to you thank you
-
Hi All. I'm using Firedac to connect my VCL Application with SQLServer. Since some weeks, I have strange Lock on tables. I have a FDQuery whit a simple "Select * from MyTable". I show the result with a DBGrid (a simple DBGrid). Another User opens a form with a FDQuery: "Select * from MyTable where ID = 1". The FDQuery is in Cached Update. When the user POST the data, the application of the user that has the first form whit the DBGrid, freeze. And also the user that has posted the data will be freezed. An important think is that the table on DB has 2 triggers that fire when the table has changed and that makes computation on field of the table. I have created a T-SQL function that gives to me information about lock: the dataset that are opened for that table are in the list. There is something that I need to do to prevent this error? Thanks, Flavio
-
I am using Delphi 10.2 and I have been given a database to connect to and I have no control over its name. It is in the format xxxx.yyyy and when I create the connection definition, all is good and I can connect. I am specifying the database as xxxx.yyyy and setting the other various parameters appropriately (the same as I do for other databases). I can use the SQL tool in the connection editor to query the tables just fine. I create a simple TFDQuery consisting of a basic "select * from table" and when I attempt to run it, I am told that database xxxx is not in the list of valid servers and it should be added to sys.servers using sp_addlinkedserver. Clearly, what Firedac is passing to SQL server leads SQL server to interpret the xxxx as a server name. I have tried "select * from tablename", "select * from dbo.tablename", "select * from [xxxx.yyyy].tablename", "select * from [xxxx.yyyy].dbo.tablename" and other variations and still it refuses to work. I am setting no specific values for the components - I create the definition in the data explorer, test that it connects, test that I can use the "SQL script" tab to run various SQL statements. I then drag one of the tables onto the form designer (a quick test) and try to run the query and it fails with the message: "Could not find server 'xxxx' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinked server to add the server to sys.servers". I have tried removing the database name from the connection definition, in the hope that the default database has been set - this does not work. Any suggestions, please? I am unable to request that the database name be changed.