I have written an application (using Delphi 2009) that allows a user to select a series of queries which can be run across a number of different systems. In order to allow queries to be run concurrently, each query is run in its own thread, using a TADOQuery object. This all works fine.
The problem that I have is when I try to close the...
Hi,
I came across a problem while updating a typed DataTable that has a primary key column.
At some point in my code I fill DataTables (some of them have primary and foreign key columns) and then I insert the data of all DataTables in one transaction using DataAdapters and Update(). Because the typed DataTables do not allow the PrimaryK...
I´m a 10 years FirebirdSQL user, and now i have a customer wanting to use MSSQL 2008.
I don´t want to start flame wars with this, i just want your advice on data access tecnology.
Im using Delphi MMVI.
Use native ADO or DBExpress?
Use third part?
Any other words of wisdom?
Thanks,
yes i know that i will have to rewrite procedures, ...
I am using ADO to query the data in a table of MS Access Database, the following code works well on my local computer that I has installed Visual Studio 2005 and Office, then I move the compiled binary exe file to a newly-installed Windows XP computer, the program will throw out an exception:
"Code = 80040e37, Msg: I, Source: Microsoft...
I'm writing an MS Outlook (2003) macro which uses an ADO Connection to an Access DB (2003). I am simply opening a connection, getting some records into a Recordset, which I use to populate a grid (but not bind to). I then close the Recordset and Connection and set both to Nothing.
Not rocket science is it? But I am getting an infuriatin...
Hi, I'm planning to improve the performance of some applications. We generally use factored datahelpers (using System.Data.Common, but we are thinking to specialize some applications that are always going to use sql server.
Does anyone know or could test if is increased the performance using specialized classes instead of factorized cl...
I've just reinstalled a server, it is a new machine, same OS verion (Win2008) and same IIS version (7.0). The app was working perfectly (and then the machine blew up).
I'm getting this error when I try to access a file outside the webroot:
ADODB.Stream error '800a0bba' File could not be opened
I can access it fine using FileSystemObje...
I have written an application that allows a user to define a query, run it using a TADOQuery component, and save the report to their PC as an XML document (SaveAsFile passing in pfXML as the Format parameter) for offline viewing. This works fine.
What I now need to do is concatenate the results. What I mean by this is that I need to get...
I am creating a table during runtime. This is how I do it:
AdoCommand1.Connection:=AdoConnection1;
cs:='CREATE TABLE '+edname.text+' (' +
'ID Integer IDENTITY(1,1) NOT NULL UNIQUE PRIMARY KEY,' +
'[Date Added] DATETIME,'+
'[Name] TEXT(255))';
ADOCommand1.CommandText:=cs;
ADOCommand1.Execute;
I need to add a field "age" which should be...
I need to compute a list of table names in a given database (MDB format), which have certain format (for example which containt DateTime field "Date Applied"). How can I do it?
Note: I am using Delphi 7, ADO components, Microsoft JET 4.0 to connect to MDB type Database.
...
I have a VB script which connects to a local SQL database to retrieve a value. The exact same script runs on about 100 servers, but a few of the servers produce this error:
[DBNETLIB][ConnectionOpen (PreLoginHandshake()).]General network error. Check your network documentation
Here is the code that runs:
Function GetPrimaryServerID
On...
My question is very simple. I have a TClientDataSet that is linked to a TADOQuery via a TDataSetProvider. I can put data into the TClientDataSet from the TADOQuery, but how do I get data from the TClientDataSet back into the TADOQuery?
Data is automatically transferred from the TADOQuery to the TClientDataSet when I run a query and then...
I have faced a very strange situation here.
I am accessing database (MDB) through JET. I use DBGrid and DBNavigator to allow user access it. Dataset is created using TADOQuery component, with the following query:
SELECT *, (DateDiff ('y',[Birth Date], Now())) AS [Age] FROM TableName
It works fine. But whenever I press Refresh button ...
Is there some way to pass a table-valued parameter to a stored procedure in SQL Server via classic ADO?
...
I have a Delphi 2007 app using ADO to connect to an Oracle database. I have found for the app to support Blob field types I need to use the OraOLEDB provider to connect. The connection string:
Provider=OraOLEDB.Oracle;Password=pwd;User ID=username;Data Source=127.0.0.1;Persist Security Info=False
I have found that using MSDAORA.1 as...
While updating a DataTable to a SQL Server database I get the error message "Column 'PK_Column' does not allow nulls" after calling GetErrors()
I don't want to provide a value for PK_Column because it is a auto increment primary key column in the database. My insert statement looks like this:
INSERT INTO [Order] ([Customer_Id], [OrderTi...
BACKGROUND:
Most of my programs use table adapters, and the connection strings are stored in app settings. This works fine, but was a real PITA when switching from development to production environment. I had to change manually the connection strings before and after starting my work on any app.
After a bit of research I found how to sw...
I have seen a couple of instances now where some legacy code I'm working on exhibits what seems buggy behovior and I wonder if I just don't understand something.
rsCaspio.Open sql, dbCaspio, ,adLockReadOnly
response.write(rsCaspio("fieldname") & "<BR>")
response.write(rsCaspio("fieldname") & "<BR>")
It will write the contents th...
I am trying to open an ADOConnection component. The database is in MDB format. I use JET to access it. Whenever I use AdoConnection.Open in my code the window pops up and asks for userid and pass. I enter "Admin" for userid and leave password empty, and it works, but I don't want this window to pop up. I tried using AdoConnection.Open('A...
I am uploading data from Excel to SQL Server using the following structure:
Private Sub ado_upload()
Dim objConnection As New ADODB.Connection
Dim objCommand As New ADODB.Command
Dim strSQL As String
Dim strDSN As String
Dim intCounter As Integer
strDSN = "provider=SQLOLEDB;" _
& "server=<server>;" _
& ...