Writeln('rows affected: ' + ADODataset1.Recordset.RecordCount.ToString()); // undeclared identifier ToString
If I leave out ToString() I get a compile error and if I leave it in ToString is underlined in red and says undeclared identifier ToString
The program compiles and runs ok, so what is...
The connection string was bad.
The correct one:
ADOConnection1.ConnectionString := 'Provider=SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;User ID="";Initial Catalog=rec1;Data Source=localhost;Initial File Name="";Server SPN=localhost';
And it works!
Thanks. That did get me a little bit farther.
function TestConnection:string;
begin
try
Writeln('Debug Line 1');
ADOConnection1 := Data.Win.ADODB.TADOConnection.Create(nil);
Writeln('Debug Line 2');
ADOConnection1.ConnectionString := 'Data...
Here's something else that doesn't work:
function TestConnection:string;
begin
CoInitialize(nil); // undeclared identifier: 'CoInitialize'
try
Writeln('Debug Line 1');
Everything I lock the computer or the screen saver comes on Delphi maximizes itself and redisplays windows that I had previously closed. How can I change this unwanted behavior?
Well, with this program anything that can go wrong will go wrong. Although I've used the Initialization section in the past, and have samples, even if I do it the same way I get this error:
expected END but received INITIALIZATION
I already tried nil. That doesn't work either. It results in this error: EOleSysError: GoInitialize has not been called
Writeln('Debug Line 1');
ADOConnection1 := Data.Win.ADODB.TADOConnection.Create(nil); // EOleSysError: GoInitialize has not been called.
Writeln('Debug...
I've been working with this in a unit. Can't figure out how to call the Create method. It doesn't like the word self. I also tried nil. What might I use then?
code:
ADOConnection1 := Data.Win.ADODB.TADOConnection.Create(Self); // undeclared identifier Self
ADOConnection1.ConnectionString :=...
I have the professional version of XE5. How might I connect to a SQL Server database or does that require additional software purchases?
Also I could not try the example because it says DBXMsSQL.dcu file not found. Where might I find this file or does that cost extra?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.