Thread: Re: [Dev-C++] OT: Connecting to FoxPro databases with a DSN
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel G. <sp...@ho...> - 2003-07-31 07:07:10
|
Do you get a connection to the database? If so can you perform a simple SQL query and output to a messagebox to test? >From: "Ed Cottrell" <em...@to...> >To: "'Dev-C++ users'" <dev...@li...> >Subject: [Dev-C++] OT: Connecting to FoxPro databases with a DSN >Date: Wed, 30 Jul 2003 16:26:37 -0400 > >Hi all - > >I know this is not a Dev-C++ post, but I'm a little new to C and am >desperate for help. I have to convert a Visual Basic program (which I >wrote) >to C or C++, the primary purpose of which is to collate information from a >bunch of databases - currently 12 Foxpro and 1 MySQL - without using DSNs. > >What I need is for somebody to point me to a resource on how to work with >the Foxpro ODBC driver from a C/C++ program; the tutorial on Microsoft's >MSDN site compiled (after some tweaks), but doesn't produce any output, and >I can't find seem to find the errors. > >Many thanks! > >-Ed > > >President >Topsail Consulting, Inc. >em...@to... >http://www.topsailconsulting.com > >Phone/Fax: 770-719-3332 >Cell: 404-328-8503 >155 Shamrock Drive >Fayetteville, GA 30215-2810 > > > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile |
|
From: Daniel G. <sp...@ho...> - 2003-07-31 15:49:26
|
did you not say the MS tutorial compiled? does that not connect? >From: "Ed Cottrell" <em...@ed...> >To: <dev...@li...> >Subject: RE: [Dev-C++] OT: Connecting to FoxPro databases with a DSN >Date: Thu, 31 Jul 2003 09:53:58 -0400 > > > Do you get a connection to the database? If so can you perform a simple >SQL > >That's just it - I don't know how to connect to the database from C or C++. >I know the database end of things (SQL, recordsets, all that); I just don't >know how to access the database, at all, with C code. > >-Ed > > > > >From: "Ed Cottrell" <em...@to...> > >To: "'Dev-C++ users'" <dev...@li...> > >Subject: [Dev-C++] OT: Connecting to FoxPro databases with a DSN > >Date: Wed, 30 Jul 2003 16:26:37 -0400 > > > >Hi all - > > > >I know this is not a Dev-C++ post, but I'm a little new to C and am > >desperate for help. I have to convert a Visual Basic program (which I > >wrote) > >to C or C++, the primary purpose of which is to collate information > >from a bunch of databases - currently 12 Foxpro and 1 MySQL - without > >using DSNs. > > > >What I need is for somebody to point me to a resource on how to work > >with the Foxpro ODBC driver from a C/C++ program; the tutorial on > >Microsoft's MSDN site compiled (after some tweaks), but doesn't produce > >any output, and I can't find seem to find the errors. > > > >Many thanks! > > > >-Ed > > > > > >President > >Topsail Consulting, Inc. > >em...@to... > >http://www.topsailconsulting.com > > > >Phone/Fax: 770-719-3332 > >Cell: 404-328-8503 > >155 Shamrock Drive > >Fayetteville, GA 30215-2810 > > > > > > > > > > > >------------------------------------------------------- > >This SF.Net email sponsored by: Free pre-built ASP.NET sites including > >Data Reports, E-commerce, Portals, and Forums are available now. > >Download today and enter to win an XBOX or Visual Studio .NET. > >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_0 > >1/01 > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >_________________________________________________________________ >On the move? Get Hotmail on your mobile phone >http://www.msn.co.uk/msnmobile > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data >Reports, E-commerce, Portals, and Forums are available now. Download today >and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile |
|
From: Ed C. <em...@to...> - 2003-08-01 03:44:07
|
>did you not say the MS tutorial compiled? does that not connect? It does compile (after a few modifications - it had some botched includes), but it exits without an error or anything. I've tried setting breakpoints and stepping into it, so I isolated the point at which it exits (on an "if" statement to determine if the query was successful, but I don't know which fork of the "if" it's following - it just exits and never makes it to the "if" commands OR the "else" commands). No dialog box or message box, no error message, nothing. Plus, it only demonstrates doing it with a DSN. The nature of this project demands that it be done without a DSN (because there are two many databases and too many client machines involved, and neither is expected to stay at all constant in number). -Ed -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Daniel Glenfield Sent: Thursday, July 31, 2003 11:49 AM To: em...@ed...; dev...@li... Subject: RE: [Dev-C++] OT: Connecting to FoxPro databases with a DSN did you not say the MS tutorial compiled? does that not connect? >From: "Ed Cottrell" <em...@ed...> >To: <dev...@li...> >Subject: RE: [Dev-C++] OT: Connecting to FoxPro databases with a DSN >Date: Thu, 31 Jul 2003 09:53:58 -0400 > > > Do you get a connection to the database? If so can you perform a > > simple >SQL > >That's just it - I don't know how to connect to the database from C or >C++. I know the database end of things (SQL, recordsets, all that); I >just don't know how to access the database, at all, with C code. > >-Ed > > > > >From: "Ed Cottrell" <em...@to...> > >To: "'Dev-C++ users'" <dev...@li...> > >Subject: [Dev-C++] OT: Connecting to FoxPro databases with a DSN > >Date: Wed, 30 Jul 2003 16:26:37 -0400 > > > >Hi all - > > > >I know this is not a Dev-C++ post, but I'm a little new to C and am > >desperate for help. I have to convert a Visual Basic program (which I > >wrote) > >to C or C++, the primary purpose of which is to collate information > >from a bunch of databases - currently 12 Foxpro and 1 MySQL - without > >using DSNs. > > > >What I need is for somebody to point me to a resource on how to work > >with the Foxpro ODBC driver from a C/C++ program; the tutorial on > >Microsoft's MSDN site compiled (after some tweaks), but doesn't > >produce any output, and I can't find seem to find the errors. > > > >Many thanks! > > > >-Ed > > > > > >President > >Topsail Consulting, Inc. > >em...@to... > >http://www.topsailconsulting.com > > > >Phone/Fax: 770-719-3332 > >Cell: 404-328-8503 > >155 Shamrock Drive > >Fayetteville, GA 30215-2810 > > > > > > > > > > > >------------------------------------------------------- > >This SF.Net email sponsored by: Free pre-built ASP.NET sites > >including Data Reports, E-commerce, Portals, and Forums are available > >now. Download today and enter to win an XBOX or Visual Studio .NET. > >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303 > >_0 > >1/01 > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >_________________________________________________________________ >On the move? Get Hotmail on your mobile phone >http://www.msn.co.uk/msnmobile > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_0 >1/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_0 >1/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Daniel G. <sp...@ho...> - 2003-08-01 18:50:51
|
I think you'd best post this function... >From: "Ed Cottrell" <em...@to...> >To: <dev...@li...> >Subject: RE: [Dev-C++] OT: Connecting to FoxPro databases with a DSN >Date: Thu, 31 Jul 2003 22:57:17 -0400 > > >did you not say the MS tutorial compiled? does that not connect? > >It does compile (after a few modifications - it had some botched includes), >but it exits without an error or anything. I've tried setting breakpoints >and stepping into it, so I isolated the point at which it exits (on an "if" >statement to determine if the query was successful, but I don't know which >fork of the "if" it's following - it just exits and never makes it to the >"if" commands OR the "else" commands). No dialog box or message box, no >error message, nothing. > >Plus, it only demonstrates doing it with a DSN. The nature of this project >demands that it be done without a DSN (because there are two many databases >and too many client machines involved, and neither is expected to stay at >all constant in number). > >-Ed > > >-----Original Message----- >From: dev...@li... >[mailto:dev...@li...] On Behalf Of Daniel >Glenfield >Sent: Thursday, July 31, 2003 11:49 AM >To: em...@ed...; dev...@li... >Subject: RE: [Dev-C++] OT: Connecting to FoxPro databases with a DSN > > >did you not say the MS tutorial compiled? does that not connect? > > > >From: "Ed Cottrell" <em...@ed...> > >To: <dev...@li...> > >Subject: RE: [Dev-C++] OT: Connecting to FoxPro databases with a DSN > >Date: Thu, 31 Jul 2003 09:53:58 -0400 > > > > > Do you get a connection to the database? If so can you perform a > > > simple > >SQL > > > >That's just it - I don't know how to connect to the database from C or > >C++. I know the database end of things (SQL, recordsets, all that); I > >just don't know how to access the database, at all, with C code. > > > >-Ed > > > > > > > > >From: "Ed Cottrell" <em...@to...> > > >To: "'Dev-C++ users'" <dev...@li...> > > >Subject: [Dev-C++] OT: Connecting to FoxPro databases with a DSN > > >Date: Wed, 30 Jul 2003 16:26:37 -0400 > > > > > >Hi all - > > > > > >I know this is not a Dev-C++ post, but I'm a little new to C and am > > >desperate for help. I have to convert a Visual Basic program (which I > > >wrote) > > >to C or C++, the primary purpose of which is to collate information > > >from a bunch of databases - currently 12 Foxpro and 1 MySQL - without > > >using DSNs. > > > > > >What I need is for somebody to point me to a resource on how to work > > >with the Foxpro ODBC driver from a C/C++ program; the tutorial on > > >Microsoft's MSDN site compiled (after some tweaks), but doesn't > > >produce any output, and I can't find seem to find the errors. > > > > > >Many thanks! > > > > > >-Ed > > > > > > > > >President > > >Topsail Consulting, Inc. > > >em...@to... > > >http://www.topsailconsulting.com > > > > > >Phone/Fax: 770-719-3332 > > >Cell: 404-328-8503 > > >155 Shamrock Drive > > >Fayetteville, GA 30215-2810 > > > > > > > > > > > > > > > > > >------------------------------------------------------- > > >This SF.Net email sponsored by: Free pre-built ASP.NET sites > > >including Data Reports, E-commerce, Portals, and Forums are available > > >now. Download today and enter to win an XBOX or Visual Studio .NET. > > >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303 > > >_0 > > >1/01 > > >_______________________________________________ > > >Dev-cpp-users mailing list > > >Dev...@li... > > >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > >_________________________________________________________________ > >On the move? Get Hotmail on your mobile phone > >http://www.msn.co.uk/msnmobile > > > > > > > >------------------------------------------------------- > >This SF.Net email sponsored by: Free pre-built ASP.NET sites including > >Data Reports, E-commerce, Portals, and Forums are available now. > >Download today and enter to win an XBOX or Visual Studio .NET. > >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_0 > >1/01 > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > > > > >------------------------------------------------------- > >This SF.Net email sponsored by: Free pre-built ASP.NET sites including > >Data Reports, E-commerce, Portals, and Forums are available now. > >Download today and enter to win an XBOX or Visual Studio .NET. > >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_0 > >1/01 > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >_________________________________________________________________ >Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data >Reports, E-commerce, Portals, and Forums are available now. Download today >and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger |
|
From: Ed C. <em...@ed...> - 2003-07-31 13:54:08
|
> Do you get a connection to the database? If so can you perform a = simple SQL=20 That's just it - I don't know how to connect to the database from C or = C++. I know the database end of things (SQL, recordsets, all that); I just = don't know how to access the database, at all, with C code. -Ed=20 >From: "Ed Cottrell" <em...@to...> >To: "'Dev-C++ users'" <dev...@li...> >Subject: [Dev-C++] OT: Connecting to FoxPro databases with a DSN >Date: Wed, 30 Jul 2003 16:26:37 -0400 > >Hi all - > >I know this is not a Dev-C++ post, but I'm a little new to C and am=20 >desperate for help. I have to convert a Visual Basic program (which I >wrote) >to C or C++, the primary purpose of which is to collate information=20 >from a bunch of databases - currently 12 Foxpro and 1 MySQL - without=20 >using DSNs. > >What I need is for somebody to point me to a resource on how to work=20 >with the Foxpro ODBC driver from a C/C++ program; the tutorial on=20 >Microsoft's MSDN site compiled (after some tweaks), but doesn't produce = >any output, and I can't find seem to find the errors. > >Many thanks! > >-Ed > > >President >Topsail Consulting, Inc. >em...@to... >http://www.topsailconsulting.com > >Phone/Fax: 770-719-3332 >Cell: 404-328-8503 >155 Shamrock Drive >Fayetteville, GA 30215-2810 > > > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including=20 >Data Reports, E-commerce, Portals, and Forums are available now.=20 >Download today and enter to win an XBOX or Visual Studio .NET.=20 >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_0 >1/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ On the move? Get Hotmail on your mobile phone = http://www.msn.co.uk/msnmobile ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including = Data Reports, E-commerce, Portals, and Forums are available now. Download = today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/= 01 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Yeoh H. <ye...@ye...> - 2003-08-01 02:44:21
|
----- Original Message ----- From: "Ed Cottrell" <em...@ed...> That's just it - I don't know how to connect to the database from C or C++. I know the database end of things (SQL, recordsets, all that); I just don't know how to access the database, at all, with C code. -Ed Hi, I have written an example program that shows how to access Microsoft Access databases using Dev-C++ without requiring the end-user to set up a DSN.. By changing the connection string, you should be able to access FoxPro databases. To download the free example program, the URL is: http://www.yeohhs.com/free/portal.asp Best Regards, Yeoh -- P.S. More free downloads for Dev-C++ users at http://www.yeohhs.com |
|
From: Ed C. <em...@ed...> - 2003-08-02 23:02:07
|
Yeoh - That was perfect! Thank you. I'll be bookmarking your homepage! God bless. -Ed -----Original Message----- From: Yeoh HS [mailto:ye...@ye...] Sent: Thursday, July 31, 2003 10:10 PM To: Ed Cottrell; dev...@li... Subject: Re: [Dev-C++] OT: Connecting to FoxPro databases with a DSN ----- Original Message ----- From: "Ed Cottrell" <em...@ed...> That's just it - I don't know how to connect to the database from C or C++. I know the database end of things (SQL, recordsets, all that); I just don't know how to access the database, at all, with C code. -Ed Hi, I have written an example program that shows how to access Microsoft Access databases using Dev-C++ without requiring the end-user to set up a DSN.. By changing the connection string, you should be able to access FoxPro databases. To download the free example program, the URL is: http://www.yeohhs.com/free/portal.asp Best Regards, Yeoh -- P.S. More free downloads for Dev-C++ users at http://www.yeohhs.com |
|
From: Graham <sai...@bi...> - 2003-08-03 01:45:55
|
----- Original Message ----- From: "Ed Cottrell" <em...@ed...> To: <dev...@li...> Sent: Sunday, August 03, 2003 8:31 AM Subject: RE: [Dev-C++] OT: Connecting to FoxPro databases with a DSN > Yeoh - > > That was perfect! Thank you. I'll be bookmarking your homepage! God bless. > > -Ed > > > -----Original Message----- > From: Yeoh HS [mailto:ye...@ye...] > Sent: Thursday, July 31, 2003 10:10 PM > To: Ed Cottrell; dev...@li... > Subject: Re: [Dev-C++] OT: Connecting to FoxPro databases with a DSN > > > ----- Original Message ----- > From: "Ed Cottrell" <em...@ed...> > That's just it - I don't know how to connect to the database from C or C++. > I know the database end of things (SQL, recordsets, all that); I just don't > know how to access the database, at all, with C code. -Ed > > Hi, > > I have written an example program that shows how to access Microsoft Access > databases using Dev-C++ without requiring the end-user to set up a DSN.. > > By changing the connection string, you should be able to access FoxPro > databases. > > To download the free example program, the URL is: > http://www.yeohhs.com/free/portal.asp > > Best Regards, > Yeoh > -- > P.S. More free downloads for Dev-C++ users at http://www.yeohhs.com > > > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Ed C. <em...@ed...> - 2003-08-03 02:48:25
|
What was your question? -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Graham Sent: Saturday, August 02, 2003 9:45 PM To: dev...@li... Subject: [Dev-C++] Newbie Q " /n " or " endl" ? ----- Original Message ----- From: "Ed Cottrell" <em...@ed...> To: <dev...@li...> Sent: Sunday, August 03, 2003 8:31 AM Subject: RE: [Dev-C++] OT: Connecting to FoxPro databases with a DSN > Yeoh - > > That was perfect! Thank you. I'll be bookmarking your homepage! God > bless. > > -Ed > > > -----Original Message----- > From: Yeoh HS [mailto:ye...@ye...] > Sent: Thursday, July 31, 2003 10:10 PM > To: Ed Cottrell; dev...@li... > Subject: Re: [Dev-C++] OT: Connecting to FoxPro databases with a DSN > > > ----- Original Message ----- > From: "Ed Cottrell" <em...@ed...> > That's just it - I don't know how to connect to the database from C or C++. > I know the database end of things (SQL, recordsets, all that); I just don't > know how to access the database, at all, with C code. -Ed > > Hi, > > I have written an example program that shows how to access Microsoft Access > databases using Dev-C++ without requiring the end-user to set up a > DSN.. > > By changing the connection string, you should be able to access FoxPro > databases. > > To download the free example program, the URL is: > http://www.yeohhs.com/free/portal.asp > > Best Regards, > Yeoh > -- > P.S. More free downloads for Dev-C++ users at http://www.yeohhs.com > > > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Dev-cpp-users mailing list Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Graham <sai...@bi...> - 2003-08-03 03:07:49
|
woops ... here is the question :) I am a newbie fighting my way through a C tutorial My book defines "/n" as new line. And defines " endl " as end line. But gives me no clue as to what the difference is or when to use which. can anyone explain the difference to me ? regards Graham |
|
From: Abhijit S. <mu...@gm...> - 2003-08-03 18:18:47
|
Hello, Graham. > My book defines "/n" as new line. > And defines " endl " as end line. > But gives me no clue as to what the difference is or when to use which. > can anyone explain the difference to me ? Two differences you should know: '\n' is new-line to C, and to Unix, but may not be new-line to your OS. For example, for Windows, "\r\n" is new-line. IIRC, for macs, it's just '\r'. endl takes care of these platform specific thingies for you (as a matter of fact, so does '\n' in files opened in text mode in STDIO, but endl is a more graceful and conformant solution. Next, endl makes sure that the text that you've written is flushed. Most streams have a buffer, so that when you write to them, the connected device or file is not updated instantly, but the results are stored in memory (this is for reasons of speed). endl makes sure that they (the files or devices) are updated. If in doubt, use endl. If you're working with raw data (binary files or such), then you will have to use '\n'. When you start working with binary files, you should be able to tell the difference anyway, if your book is any good. Hope this helps. -- Abhijit Shylanath Homepage: http://mudeth.tripod.com/ |
|
From: Graham D. <g.d...@nt...> - 2003-08-04 08:51:19
|
To just add a small amount to Abhijit's reply, think of it like this: '\n' (note: _not_ '/n') is just a character, but endl is a function that can do all sorts of things in addition to just adding a character or two to the output stream. Abhijit Shylanath wrote: >Hello, Graham. > > > >>My book defines "/n" as new line. >>And defines " endl " as end line. >>But gives me no clue as to what the difference is or when to use which. >>can anyone explain the difference to me ? >> >> > >Two differences you should know: > > '\n' is new-line to C, and to Unix, but may not be new-line to your OS. >For example, for Windows, "\r\n" is new-line. IIRC, for macs, it's just >'\r'. endl takes care of these platform specific thingies for you (as a >matter of fact, so does '\n' in files opened in text mode in STDIO, but endl >is a more graceful and conformant solution. > > Next, endl makes sure that the text that you've written is flushed. Most >streams have a buffer, so that when you write to them, the connected device >or file is not updated instantly, but the results are stored in memory (this >is for reasons of speed). endl makes sure that they (the files or devices) >are updated. > > If in doubt, use endl. If you're working with raw data (binary files or >such), then you will have to use '\n'. When you start working with binary >files, you should be able to tell the difference anyway, if your book is any >good. > >Hope this helps. > >-- >Abhijit Shylanath >Homepage: http://mudeth.tripod.com/ > > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > |
|
From: Michael D. S. <for...@hi...> - 2003-08-04 21:51:24
|
> "the results are stored in memory (this is for reasons of speed). endl
makes sure that they (the
> files or devices) are updated."
Well sorta'. It does flush it out of the buffer but then the channel
program picks it up and it also has a queue. A networked printer at a big
company could develop a queue during the day long enough to print well into
the night but printers are very slow. With a disk it's generally seconds or
at most minutes but that's still forever to the CPU, the channel program
queue (disk swap area) keeps it from having to wait. OK, as much, even
writing to main memory is slow to the cpu.
Mostly this detail doesn't matter but if you're programming CGI and
wondering why your files are getting corrupted, this is the reason. A
second hit tries to read before the write from the first has cleared the
queue. Because of the queue and because a shared server has a lot of other
traffic (also in the queue), this doesn't take near as much traffic to your
site as you might think. A hundred hits a day can do it, mostly because
much like the freeways everyone seems to want to go at once.
File locks are the answer to that problem -- if you can get 'em to work.
Usually 8k is the most efficient buffer size for a disk drive and if you're
writing that much or more you should allow it use it's optimum buffer size.
If you're only writing a few lines or you have a need for speed, for CGI or
whatever reason, a buffer flush is what you want.
Still I wouldn't do this:
cout << "line one"
<< endl
<< "line two"
<< endl;
but rather this:
cout << "line one\nline two"
<< endl;
I know that's so little and the computer is so fast that it's practically
irrelevant, but I like to feel I'm doing the best I can anyway:)
ms
If at first you don't succeed, destroy all evidence that you tried
At 03:51 AM 8/4/03, you wrote:
>To just add a small amount to Abhijit's reply, think of it like this: '\n'
>(note: _not_ '/n') is just a character, but endl is a function that can do
>all sorts of things in addition to just adding a character or two to the
>output stream.
>
>Abhijit Shylanath wrote:
>
>>Hello, Graham.
>>
>>
>>
>>>My book defines "/n" as new line.
>>>And defines " endl " as end line.
>>>But gives me no clue as to what the difference is or when to use which.
>>>can anyone explain the difference to me ?
>>>
>>
>>Two differences you should know:
>>
>> '\n' is new-line to C, and to Unix, but may not be new-line to your OS.
>>For example, for Windows, "\r\n" is new-line. IIRC, for macs, it's just
>>'\r'. endl takes care of these platform specific thingies for you (as a
>>matter of fact, so does '\n' in files opened in text mode in STDIO, but endl
>>is a more graceful and conformant solution.
>>
>> Next, endl makes sure that the text that you've written is flushed. Most
>>streams have a buffer, so that when you write to them, the connected device
>>or file is not updated instantly, but the results are stored in memory (this
>>is for reasons of speed). endl makes sure that they (the files or devices)
>>are updated.
>>
>> If in doubt, use endl. If you're working with raw data (binary files or
>>such), then you will have to use '\n'. When you start working with binary
>>files, you should be able to tell the difference anyway, if your book is any
>>good.
>>
>>Hope this helps.
>>
>>--
>>Abhijit Shylanath
>>Homepage: http://mudeth.tripod.com/
>>
>>
>>-------------------------------------------------------
>>This SF.Net email sponsored by: Free pre-built ASP.NET sites including
>>Data Reports, E-commerce, Portals, and Forums are available now.
>>Download today and enter to win an XBOX or Visual Studio .NET.
>>http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
>>_______________________________________________
|