List:General Discussion« Previous MessageNext Message »
From:Ed Carp Date:October 16 2002 5:56pm
Subject:RE: about use Dev-cpp and C++
View as plain text  
sql, query

> But it would be so nice to write:
>
> MySQLConn DB = new MySQLConn ('host', 'port');
> DB.Login('user', 'pass');
> MySQLTransaction X = new MySQLQuery(DB);
>
> // STL-derived slist:
> MySQLResults Results = X.Query("...");
>
> // STL map:
> map Row;
> while (Results.NextRow(Row)) {
>     cout << "ID: " << Row["ID"] << ", Value: " <<
> Row["Value"] << endl;
> }
>
> ... PS, anyone seen such an API? :)

How about:

OpenDatabase(host, database, user, pass);
OpenRecordset("select * from blah");
while(RecordsetEOF() != EOF)
{
printf("ID: %d Value: %s\n", GetField("ID"), GetField("Value"));
MoveNext();
}
CloseRecordset();
}

Look for MyC on mysql.com - if you can't find it, email me directly.  The most recent
version supports nested SQL, too.  The
Escapade server-side programming language is built on top of MyC.
--
Ed Carp, N7EKG          http://www.pobox.com/~erc               214/986-5870
Licensed Texas Peace Officer
Computer Crime Investigation Consultant

Director, Software Development
Escapade Server-Side Scripting Engine Development Team
Pensacola - Dallas - London - Dresden
http://www.squishedmosquito.com

"The whole aim of practical politics is to keep the populace alarmed-- and
thus clamorous to be led to safety-- by menacing it with an endless series
of hobgoblins, all of them imaginary."
-- H. L. Mencken

Thread
about use Dev-cpp and C++wang tianyi14 Oct
  • Re: about use Dev-cpp and C++Insanely Great14 Oct
  • Re: about use Dev-cpp and C++Michael T. Babcock16 Oct
    • RE: about use Dev-cpp and C++Ed Carp16 Oct
      • RE: about use Dev-cpp and C++wang tianyi18 Oct
        • RE: about use Dev-cpp and C++Ed Carp18 Oct
          • RE: about use Dev-cpp and C++wang tianyi18 Oct
    • Re: about use Dev-cpp and C++wang tianyi18 Oct