🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.database.dotnet
3 messages
3 total messages Started by Hertha Steck Sun, 15 Apr 2007 13:26
No SqlConnection.State.ToString in Delphi?
#35
Author: Hertha Steck
Date: Sun, 15 Apr 2007 13:26
15 lines
1383 bytes
I'm working through some examples from ADO.NET books not written for 
Delphi. So I put this into the handler for a button:

MessageBox.Show('SQL-Verbindung ist ' + m_conDBSQL.State.ToString);

Compile error: E2473 Record or class type necessary (my translation from 
german)

The help contains very similar examples, but again uses VB.NET and C# - 
the .NET help doesn't seem to have any Delphi example code.

What's the right way to convert a ConnectionState to a string?

Thank you,
Hertha
Re: No SqlConnection.State.ToString in Delphi?
#36
Author: Marc Rohloff TeamB
Date: Sun, 15 Apr 2007 20:42
11 lines
1450 bytes
On Sun, 15 Apr 2007 15:26:24 +0200, Hertha Steck wrote:

> What's the right way to convert a ConnectionState to a string?
Try
  System.Enum(m_conDBSQL.State).ToString
  System.Object(m_conDBSQL.State).ToString


-- 
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
Re: No SqlConnection.State.ToString in Delphi?
#37
Author: Hertha Steck
Date: Wed, 18 Apr 2007 19:09
12 lines
1343 bytes
Marc Rohloff [TeamB] schrieb:
> On Sun, 15 Apr 2007 15:26:24 +0200, Hertha Steck wrote:
> 
>> What's the right way to convert a ConnectionState to a string?
> Try
>   System.Enum(m_conDBSQL.State).ToString
>   System.Object(m_conDBSQL.State).ToString
> 
> 
Thank you, that works.

Hertha
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads