Re: MS SQL - How to get simple Integers from the SQL-Server to Delphi

From: Bernhard Hartl (Nospam_at_Nospam.com)
Date: 06/05/04


Date: Sat, 5 Jun 2004 09:34:27 +0200

Thank you Kevin

Bernhard

"Kevin Frevert" <Work@drinkingcoffee.com> schrieb im Newsbeitrag
news:40c0789c$1@newsgroups.borland.com...
> Bernhard,
>
> In your TADOConnection connection string, set the "Use Procedure for
> Prepare" to 0 (default is 1) and set the TADODataSet.Prepared property to
> False.
>
> That removed those "silly" statements for me (D6 Enterprise/MSSQL 2K).
>
> krf
>
> "Bernhard Hartl" <Nospam@Nospam.com> wrote in message
> news:40c01b81$1@newsgroups.borland.com...
> > Hello Kevin
> >
> > it's not "silly" Microsoft
> > but "silly" Borland
> >
> > try the following Code using VB6
> >
> > Private Sub Command1_Click()
> > Dim rs As New ADODB.Recordset
> >
> > SQL = "SELECT COUNT(*) AS myCount FROM Interface"
> > rs.Open SQL, deTest.DBCon
> > MsgBox (rs!myCount)
> > rs.Close
> > End Sub
> >
> >
> > The result is in the SQL-Profiler
> > SELECT COUNT(*) AS myCount FROM Interface
> > and nothing else
>
>



Relevant Pages

  • Re: Löschen eines Datensatzes
    ... > Bernhard Richter schrieb: ... >> Private Sub Button1_Click(ByVal sender As System.Object, ... >> Dim Dateinr As Short ...
    (microsoft.public.de.vb)
  • Re: Makro und Schaltfläche
    ... Dim MyComp As VBComponents ... führen zu einer Fehlermeldung (Benutzerdefinierter Typ nicht definiert) ... Gruss ... > Hallo Helmut, Bernhard ...
    (microsoft.public.de.word)