Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / How to use wxDB connect to ODBC?

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. How to use wxDB connect to ODBC?
#2637
Posted by: mooncake 2003-09-17 20:21:36
Hi,  i face this problem for few days, still cant fix it... Could somebody guide me?

It always prompt me "linker error, undefined reference to wxDb::Open(..."

Thank you.

#include "wx/db.h"
#include "wx/odbc.h"


class getODBC {
    public:
   
    void ConnectODBC();

    private:

    wxDb *dbms;   
};

void getODBC::ConnectODBC() {
     if (dbms->IsOpen()==false) {
         dbms->Open("MySQL","username","password");
     }
}
Meow~
Message2. Re: How to use wxDB connect to ODBC?
#2638
Posted by: guidance 2003-09-17 20:38:39
Are you sure ODBC is enabled in your wx lib? May try this one: http://g.yi.org/_scripts/file.php?f=2618&r=46#5771
Message3. Re: How to use wxDB connect to ODBC?
#2643
Posted by: mooncake 2003-09-18 20:40:17
Hi, I had set like this in setup.h

#define wxUSE_ODBC          1

but now, prompt me error from "sqltypes.h"

syntax error before ; token
conflicting types for `typedef struct tagDATE_STRUCT DATE_STRUCT'
previous declaration as `typedef struct _DATE_STRUCT DATE_STRUCT'

and much and much error message... >_<

thank you.
Meow~
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0