Free2Code
 
Time: 2008-11-21, 08:37pm
Databse connection in VC++
Subject: Databse connection in VC++  ·  Posted: 2004-05-22, 06:06pm
Rank: Unregistered
I want to connect to MS-SQl sever using Vc++.
I donno how to do it. Could u plz give a sample code
to do this.
 
  Reply to this ·  Post link ·  Top
Subject: Re: Databse connection in VC++  ·  Posted: 2004-05-24, 04:49am
Rank: ? (2172)
Member #: 11609
Use ADO.
I don't use VC++, but know C#, so I can't help you with any specific code.
Get a book on VC++ if you can't find a way to use ADO in VC++.

A guy gets on a bus and starts threatening everybody: "I'll integrate you! I'll differentiate you!!!" So everybody gets scared and runs away. Only one person stays. The guy comes up to him and says: "Aren't you scared, I'll integrate you, I'll differentiate you!!!" And the other guy says: "No, I am not scared, I am e to the power of x."
 
  Reply to this ·  Post link ·  Top
Subject: VC++ Printing dll  ·  Posted: 2004-06-11, 01:59am
Rank: Unregistered
I have a dll written in VC++. It defines a FontSet() method which internally calls standard CreateFont() method to set the font face and size. I am calling this dll from JavaScript. It was working perfectly fine, but I have added two new patches with 4 more calls to this FontSet() method. Now when I am printing more than 100 pages, the machine from where I fire the print command hangs, showing clear signs of memory overuse. Also after 40 pages the font changes and starts printing in different font. Is it because CreateFont() creates new objects which occupy more space. Also as soon as I revert back to the old code, it peacefully prints upto 2000 pages. So why is this CreateFont() called just 4 more times gives such a problem.

Any help please let me know. I am in desperate situation.
 
  Reply to this ·  Post link ·  Top
Subject: Re: Databse connection in VC++  ·  Posted: 2004-06-11, 02:52am
Rank: ? (4821)
Member #: 3416
can you release the object when you're done with it?

my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at track7.org
 
  Reply to this ·  Post link ·  Top
Subject: vc++ database  ·  Posted: 2004-06-20, 03:43am
Rank: Unregistered
rafeequddin_ahmed@yahoo.com


connnection to database :
i have to connect to orace .and it should not prompt me with odbc dialouge .it should take default username and password of oracle user.
And also i have to update a field in the tabel in oracle .
please tell me the mechanism from scratch.

thanking u.


rafeequddin_ahmed@yahoo.com

 
  Reply to this ·  Post link ·  Top
Subject: connection with sql server2000 usingvc++  ·  Posted: 2004-06-21, 10:54pm
Rank: Unregistered
I need to make the connection with sql server 2000 using vc++6.0 . i wanted to use the oledb or AdO
please tell me the process from the scratch . i also need the join on different tables.
 
  Reply to this ·  Post link ·  Top
Subject: DataBase Connecton  ·  Posted: 2004-07-05, 04:22pm
Rank: Unregistered
//add header file
#include "afxdb.h"
//Declare to Global Variable
CDatabase cn;
CRecordset rs(&cn);
//in intialdialog procedure add follin code.
try
{
cn.OpenX("dsn=;uid=;pwd=;server=",CDatabase::noOdbcDialog);
}
catch(CDBException e){}
//Open recrdset
CString sql = "select * from emp";
rs.Open(CRecordset::snapshot,sql,CRecordset::none);
short fieldNumber=0;CString fieldValue;
while(!rs.IsEOF())
{
rs.GetFieldValue(fieldNumber,fieldValue);
//Some Operation
rs.MoveNext();
}
rs.Close();
 
  Reply to this ·  Post link ·  Top
Subject: nothing  ·  Posted: 2004-07-17, 06:32pm
Rank: Unregistered


hi

Mahbub
 
  Reply to this ·  Post link ·  Top
Subject: DataBase connection using ODBC  ·  Posted: 2004-07-21, 09:25pm
Rank: Unregistered
Hi Guys,

I want to use ODBC to Connect to MS Access, however I have my table linked to an excel spreadsheet for updating any changes that are made on the spreadsheet. to my database in Access

When I start my Appl in MFC & VC++6 for DataBase support. I select the Access Database , but it does not show the linked table to Excel which is located inside the MS Access database.

What can one do get connection to a Table linked to Excel, so that my Application gets data from the Excel linked table.

Please Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
  Reply to this ·  Post link ·  Top
Subject: Re: Databse connection in VC++  ·  Posted: 2004-07-21, 09:33pm
Rank: Unregistered
Hi Guys,

I want to use ODBC to Connect to MS Access, however I have my table linked to an excel spreadsheet for updating any changes that are made on the spreadsheet. to my database in Access

When I start my Appl in MFC & VC++6 for DataBase support. I select the Access Database , but it does not show the linked table to Excel which is located inside the MS Access database.

What can one do get connection to a Table linked to Excel, so that my Application gets data from the Excel linked table.

Please Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

celemba@hotmail.com
 
  Reply to this ·  Post link ·  Top
Subject: Que- How to run parametarised query in vc++  ·  Posted: 2004-10-17, 06:46pm
Rank: Unregistered
How to use CDatabase class and CRecordset class for retrieving data from parametric query
 
  Reply to this ·  Post link ·  Top
Subject: Calling a dll from javascript  ·  Posted: 2004-10-24, 05:41pm
Rank: Unregistered
I wrote a dlls file using C#.NET , and i want to call it from javascript.......Can anybody tell me how to do it...?? Thankss....
 
  Reply to this ·  Post link ·  Top
Subject: how can i manage a CtreeviewCtrl  ·  Posted: 2004-10-29, 07:43pm
Rank: Unregistered
hi,
i am getting one problem in case of tree control.it' s dialog base application.in which i am using no of selected item from list view control and making a tree in other dialog.but at the time when window size is increasing more then tree area tree is going to be disable

2) when ever i clicked on three parent node it's working proper
but at the time when i clicked on the leaf of the tree
and after that when i clicked on {+/-} again it's going to hide itself

for this i used scroll bar logic so expansion started working proper
but after that same problem when ever i click on the leaf and again i clicked of the tree {+/-}node i am unable to c my tree it's tree only
beca i clicked on the same disable place again and i can see tree gain there so
plese tell me some solution to come out with this problem




 
  Reply to this ·  Post link ·  Top
Subject: Re:Oracle Databse connection in VC++  ·  Posted: 2004-11-04, 08:01pm
Rank: Unregistered
get a sample pgm
how to connect to oracle
what is the driver name and dsn name in odbc settings
 
  Reply to this ·  Post link ·  Top
Subject: Re: Oracle Databse connection in VC++  ·  Posted: 2004-11-16, 11:46pm
Rank: Unregistered
get a sample pgm
how to connect to oracle
what is the driver name and dsn name in odbc settings and what are the data types of the connection and recordset
 
  Reply to this ·  Post link ·  Top
This post has been removed by a moderator (reason: off topic)
 
  Top
Subject: Re: Calling a dll from javascript  ·  Posted: 2004-12-06, 01:01am
Rank: Unregistered
http://forums.aspfree.com/t35628/s.html


 
  Reply to this ·  Post link ·  Top
Subject: Re: Calling a dll from javascript  ·  Posted: 2004-12-06, 06:26pm
Rank: Unregistered

function comEventOccured()
{

try{
var myobject;
myobject = new ActiveXObject("JSDll.CoTest";

alert("Test1";
alert(myobject.TestMethod()); // HERE i want to call DLL Function .
}
catch(e)
{
//if(e.message == "Automation server can't create object"
//myobject = new ActiveXObject("JCJInterface.dll";
////alert("myproject value in javascript "+myobject);
}
//action="/exchweb/bin/auth/owaauth.dll"
}

 
  Reply to this ·  Post link ·  Top
This post has been removed by a moderator (reason: smiley spam)
 
  Top
Subject: Re: Databse connection in VC++ by ADO  ·  Posted: 2004-12-13, 05:05pm
Rank: Unregistered
plzx help me out in this context that i can understand also
 
  Reply to this ·  Post link ·  Top

Pages: 1 · 2

Topic is closed.

icons