🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #674

Error MYSQL.H LineNo Too many types in declaration

#674
From: Rubber Ducky
Date: Sun, 27 May 2001 17:47
99 lines
4722 bytes
Welcome and thanks for the time in reading this.  I have a simple proggie
below.  When I try and compile it I get the error above (subject) the error
points to this part of mysql.h - the part specifically is highlighted in
red.

I am compiling it on Win2K SP2 with Borland C++ v4.52
I can't see any reason why this wouldn't work. Can you??


I also get 5 warnings:
WARNING MYSQL.CPP LineNo: Temporary used for parameter 1 in call  to
'istream::operator >> (int &)' in function main()
-  Well seeing as I have a problem anyway it seems silly not to mention it!

<extract from mysql.h>
#if defined(NO_CLIENT_LONG_LONG)
typedef unsigned long my_ulonglong;
#elif defined (__WIN__)
typedef unsigned __int64 my_ulonglong;
#else
typedef unsigned long long my_ulonglong;
#endif
<end of extract>


<CODE>

////////////////////////////////////////////////////////////////////////////
////
// Program: Client proggie to connect to mysql server.  Server options are
// specified by the user
// Aim: To retrieve data from table specified by user in Microsoft access
format
// and insert the table into a Microsoft access database of the users choice
//
//  Command line version of the program currently being investigated
//  I.e. c:\this_proggie -h host -u user -p pass -po port
//
// Start of development: 24th May 2001
// Date modified: 27th May 2001
// Author: David Ayliffe
// Version: 0.1
////////////////////////////////////////////////////////////////////////////
////

#include <stdio.h>
#include <iostream.h> // libraries included in the linked (object) file
#include <conio.h>
#include "mysql.h"      // include the mysql libraries copied from the win
        // source download

#define def_host_name NULL /*host to connecto to (default localhost) */
#define def_user_name NULL /*user name for the database (default login name)
*/
#define def_password  NULL /*password for the database (default is null) */
#define def_db_name   NULL /*default database (default database default
none) */
#define def_svr_port  NULL /*port to connect to (default 3306) */

MYSQL  *conn;              /*pointer to the connection handle */

int main ()
{
 clrscr();
 cout << "Enter the host name (default localhost): ";
 cin >> def_host_name;
 cout << "Enter the user name (default root): ";
 cin >> def_user_name;
 cout << "Enter the password (default blank): ";
 cin >> def_password;
 cout << "Enter the database name (default none): ";
 cin >> def_db_name;
 cout << "Enter the port (default 3306): ";
 cin >> def_db_name;

 // the real work starts here

 conn = mysql_init (NULL);
 mysql_real_connect (
      conn,                  // pointer to connection handle
      def_host_name,         // host to connect to
      def_user_name,         // user name to connect as
      def_password,          // password to use
      def_db_name,           // database to use
      def_svr_port,          // port to connect through
      NULL,                  // socket
      0);                    // flags

 mysql_close (conn);
 return 0;
}

<\CODE>
--
Thanks
Rubber Ducky

Please reply to group or to email
To reply to email remove NOSPAM
Technical Details
Message-ID: <O4bQ6.22830$PQ5.2471690@news1.cableinet.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!news-hub.cableinet.net!blueyonder!internal-news-hub.cableinet.net!news1.cableinet.net.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113e35,6f5917ae2da25166,start
X-Google-Attributes: gid113e35,public
X-Google-Thread: 10b7bb,6f5917ae2da25166,start
X-Google-Attributes: gid10b7bb,public
X-Google-Thread: 114592,6f5917ae2da25166,start
X-Google-Attributes: gid114592,public
X-Google-Thread: fef06,6f5917ae2da25166,start
X-Google-Attributes: gidfef06,public
X-Google-Thread: 109fba,6f5917ae2da25166,start
X-Google-Attributes: gid109fba,public
X-Google-ArrivalTime: 2001-05-27 10:48:05 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!newsfeed.direct.ca!look.ca!news-hub.cableinet.net!blueyonder!internal-news-hub.cableinet.net!news1.cableinet.net.POSTED!not-for-mail
Reply-To: "Rubber Ducky" <news@ayliffe.comNOSPAM>
From: "Rubber Ducky" <news@ayliffe.comNOSPAM>
Newsgroups: alt.comp.lang.learn.c-c++,comp.lang.c++,comp.lang.c++.leda,ctdl.lang.c++,slac.lang.c++
Subject: Error MYSQL.H LineNo Too many types in declaration
Lines: 102
Organization: None
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2465.0003
Message-ID: <O4bQ6.22830$PQ5.2471690@news1.cableinet.net>
Date: Sun, 27 May 2001 17:47:26 GMT
NNTP-Posting-Host: 62.31.190.118
X-Complaints-To: http://www.blueyonder.co.uk/abuse
X-Trace: news1.cableinet.net 990985646 62.31.190.118 (Sun, 27 May 2001 18:47:26 BST)
NNTP-Posting-Date: Sun, 27 May 2001 18:47:26 BST