VC ADO连接SQL数据库

vc实现SQL数据库ADO连接(菜鸟入门篇) 关于vc6.0中实现ADO SQL数据库连接的文章网上虽然很多,但大多写的很繁琐,对于我们这样的菜鸟来说,还是很希望有一篇能把看似一个复杂的问题简单化的文章的。从网上收集了一些资料实践过后晒到博客里,希望跟我一样的菜鸟们学的开心!下面开始。概述:要在一个vc工程中实现数据库的连接,最好的方式是在新建一个用于连接数据库的类比如ADOConn,需要连接数据库的时候将这个类实例化就可以了(即新建一个 阅读详情

 

VC ADO连接SQL数据库

数据源方式连接。

1、应用程序的stdafx.h头文件中(也可以在其他合适的地方)包含如下语句。

#import "C://program files//common files//system//ado//msado15.dll" no_namespace rename ("EOF", "adoEOF")

 

2、连接数据库

CoInitialize(NULL);                                          //初始化Com组件不知是否有必要

     //conPtr.CreateInstance("ADODB.Connection");            //Connection用于与数据库服务器的链接

     conPtr.CreateInstance(__uuidof(Connection));            //Connection用于与数据库服务器的链接另一种方式

     CString conStr;

     conStr.Format(_T("DSN=%s;"), _T("数据源名"));

     /******************连接数据库********************/

     try

     {

         conPtr->ConnectionTimeout = 5;                          //设置连接时间

         conPtr->Open((_bstr_t)conStr, _T("用户名"),_T("密码"), adModeUnknown);

     }

     catch(_com_error e)                                              //捕捉异常

     {

         AfxMessageBox(e.ErrorMessage());

     }

     CoUninitialize();                                       //释放com组件//不知是否有必要

        

3、访问数据库

_RecordsetPtr recordPtr;//数据集指针

recordPtr.CreateInstance(__uuidof(Recordset));

CString cmdStr=_T("select name,stuno from student");//student为表名 该表中有两个字段name(字符型)stuno(int型)

     try

     {

              recordPtr->Open(_variant_t(cmdStr),

              conPtr.GetInterfacePtr(),

              adOpenDynamic,

              adLockOptimistic,

              adCmdText);

     }

     catch (_com_error  e)

     {

         AfxMessageBox(e.Description());

     }

     while (!(recordPtr->adoEOF))

     {//获取记录

         CString name=(CString)recordPtr->GetCollect(_variant_t("name")).bstrVal;

         int no=recordPtr->GetCollect(_variant_t("stuno")).intVal;

         recordPtr->MoveNext();

     }

     recordPtr->Close();//关闭记录集

     recordPtr.Release();//释放空间

     conPtr->Close();//关闭连接

     conPtr.Release();//释放空间

 

非数据源方式连接。

应用程序的stdafx.h头文件中(也可以在其他合适的地方)包含如下语句。

#import "C://program files//common files//system//ado//msado15.dll" no_namespace rename ("EOF", "adoEOF")

 

连接数据库

CoInitialize(NULL);                                          //初始化Com组件不知是否有必要

     conPtr.CreateInstance(__uuidof(Connection));            //Connection用于与数据库服务器的链接

     CString conStr;// (local)表示本地                       //数据库连接字符串

     conStr.Format(_T("Driver=SQL SERVER;Database=%s;Server=%s;"), _T("数据库名"),_T("(local)"));

     /******************连接数据库********************/

     try

     {

         conPtr->ConnectionTimeout = 5;                          //设置连接时间

         conPtr->Open(_bstr_t(conStr),_T("用户名"),_T("密码"),option);    //连接SQL SERVER

     }

     catch(_com_error e)                                              //捕捉异常

     {

         AfxMessageBox(e.ErrorMessage());

     }

     CoUninitialize();                                            //释放com组件

获取记录集

获取记录集的方式与数据源方式访问数据库相同

 

 

 

VC访问数据库技术(以Postgre为例)   源代码:参考我的资源中“VC访问Postgre数据库” 最常用的数据库访问技术有如下几种1.      ODBC——开放数据库互联ODBC为使用不同的关系数据库提供了一个统一的程序设计接口。在安装不同的数据库后,需要创建ODBC数据源,2.      DAO——数据访问对象3.      RDO——远程数据对象4.      OLE DB——对象连接与嵌入数据库 阅读详情

相关推荐

VC用ADO的方法连接SQL server 2000

费了不小的功夫才搞通vc连接数据库的一些内容,写出来和大家分享一下!首先SQL server2000 应该设置成混合身份验证模式,再应该添加ado的一个动态链接库,在stdAfx.h文件中添加#import "C:/Program Files/Common Files/System/ADO/msado15.dll" no_namespace /rename("EOF","adoEOF")

cxf7394373的专栏 3553

VC中ADO连接SQLSERVER的几种标准方式

VC用ADO访问数据库全攻略,介绍了VC用ADO来访问数据库的各个对象及各方法,很经典,也很实用,很值得一看。 [转]正文 一、ADO概述 ADO是Microsoft为最新和最强大的数据访问范例 OLE DB 而设计的,是一个便于使用的应用程序层接口。ADO 使您能够编写应用程序以通过 OLE. DB 提供者访问和操作数据库服务器中的数据。ADO 最主要的优点是易于使用、速度快、内存支出少和磁

Jogholy的专栏 979

MFC VC ADO链接SQL Server数据库 操作数据库数据

//1.包含ADO包,在stdafx.h中添加下面的代码: #import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF", "adoEOF") //2.初始化COM库 AfxOleInit(); //3.创建连接实例 m_pConnection.CreateInstan

hejizhu_tianyi的专栏 1202

VC与数据库SQL的链接

<br />一、ADO简介<br />ADO(ActiveX Data Object)是Microsoft数据库应用程序开发的新接口,是建立在OLE DB之上的高层数据库访问技术,请不必为此担心,即使你对OLE DB,COM不了解也能轻松对付ADO,因为它非常简单易用,甚至比你以往所接触的ODBC API、DAO、RDO都要容易使用,并不失灵活性。本文将详细地介绍在VC下如何使用ADO来进行数据库应用程序开发,并给出示例代码。<br />本文示例代码二、基本流程<br />万事开头难,任何一种新技术对于初学

majinguang2004的专栏 507

VC6.0 ADO方式连接远程计算机的SQL Server 2000数据库的方法

最近学习VC6.0操作SQL Server数据库,本地连接,很简单,直接使用数据源更方便,如果数据库不在本机,在虚拟机或是远程计算机上如何连接呢? 下面是连接方式:经过测试成功。 AfxEnableControlContainer(); // Init Login Count m_iLoginCount = 0; // Create ADO Connection if( FA

坚韧与专注 2940

vc 使用ado 连接使用sql server 2000数据库

vc使用ado连接使用sql server 2000数据库的简单例子。 提供查询,插入,更新的基本操作,仅供开始学习者参考。

VC++的ADO连接SQL Server步骤

 1:SQL  Server数据库配置     开启服务器   托盘显示服务器启动   2:在StaAfx.h 中添加如下代码 #import "C://Program Files//Common Files//System//ado//msado15.dll" no_namespace      rename("

LEEBIAO的专栏 1876

Verilog——反相器

反相器代码: module inv( A, Y );//A,Y是端口 //定义端口属性 input A; output Y; //定义输入输出关系 assign Y=~A;//Y等于A的反 endmodule //inv是module的名字

weixin_41788560的博客 9505

VC++使用ADO连接数据库(SqlServe

1.引入ADO库文件

GIS探索之路 839

Stanford CS230深度学习(一)

斯坦福CS230可以作为深度学习的入门课,最近我也在跟着看视频、完成编程作业。首先列出使用的资源链接,然后给出第一课的理解和编程作业的代码。 所有资料如下: 一、课程连接: b站课堂讲授版:Stanford CS230(吴恩达 深度学习 Deep Learning | Autumn 2018)(中英双字幕) (一共10个视频,每周一个,但是每个视频对应下面的配套视频较多) Coursera配套视...

weixin_44750583的博客 2402

SAGA GIS英文版进行地形分析,计算常用的地形因子等

SAGA GIS中文版是一款专业的自动化地球科学分析系统软件。SAGA GIS最新版界面简洁,操作简便,用户使用时输入要分割的影像,选择要计算特征的影像或者波段,设置越大,得到的斑块越大;反之,则越小,点击Okay,得到分割影像图。SAGA GIS中文版主要通过选择适合你影像的格式,加载影像。 SAGA GIS全称是System for Automated Geoscientific Analyses,是一种用于编辑空间数据的地理信息系统(GIS)计算机程序,它是免费的开源软件,SAGA GIS旨在为科学家

qq_35794085的博客 5654

vc6中实现ADO SQL数据库连接

关于vc6.0中实现ADO SQL数据库连接的文章网上虽然很多,但大多写的很繁琐,对于菜鸟来说,还是很希望有一篇能把看似一个复杂的问题简单化的文章的。 概述:要在一个vc工程中实现数据库的连接,最好的方式是在新建一个用于连接数据库的类比如ADOConn,需要连接数据库的时候将这个类实例化就可以了(即新建一个ADOConn的对象,比如ADOConn ac;)。然后再引用些对象就可以实现相应的操作了。...

solo_chen的博客 873

Linux 系统管理员必备:Chrome 企业版离线部署全攻略(含 RPM/DEB 双版本)

本文详细介绍了Linux系统管理员如何离线部署Chrome企业版,涵盖RPM和DEB双版本。从获取官方离线安装包到静默安装、权限配置及企业级策略管理,提供全流程解决方案,特别适合Ubuntu等DEB系系统管理员参考。

f9g0h的博客 506

VC+ADO下连接并操作sql2005数据库方法总结

最近在用VC ado连接SQL2005做开发,在网上也参考了好多资料,自己研究了几天,最后把使用方法思路整理下:   在需要使用的地方按如下框架使用: 0. 定义一个CAdoConn 类全局对象, 例如:在CTestDialogI添加一个公有的成员变量CAdoConn m_adoconn; 1. 调用初始化OLE/COM库环境并连接数据库, 如:a_adoconn.OnInitADOConn

chzhpi_10的专栏 937

手把手教你用Wireshark抓包分析Profinet非周期通信(附实战案例)

本文详细解析了PROFINET非周期通信(RTA)的技术原理与实战应用,通过Wireshark抓包分析,揭示从PLC请求到驱动器响应的完整对话过程。涵盖实验环境搭建、关键配置步骤、典型参数访问流程及故障诊断案例,帮助工程师深入理解并优化工业网络通信性能。

Black的专栏 1057

使用PyTorch和TextCNN实现英文长文本诗歌文本分类

在这个过程中,我们了解了如何进行文本数据预处理、构建TextCNN模型,并进行训练与评估。首先,我们需要将文本文件加载到内存中,并将每个诗歌作为一个样本。然后,我们需要将每个样本转换为数字表示,这可以通过将词汇表中的每个词语映射到一个唯一的整数来实现。此外,我们还需要将每个样本的长度统一为固定值,以便于模型输入。通过这个示例,我们可以学习如何构建一个简单但有效的文本分类模型,并在具体的应用场景中进行训练和预测。该模型通过使用多个不同尺寸的卷积核来捕捉文本中的不同长度的信息,并通过最大池化操作提取关键特征。

loop_syntax648的博客 256

VC编写ADO连接Access,SQL Server数据库入门实例

为了在VC中使用Ado,需要在头文件中加入以下几行代码: #import "C:\\program files\\common files\\system\\ado\\msado15.dll" no_namespace rename("EOF", "adoEOF") #include "adoid.h" #include "icrsint.h" 第一行的#import...

weixin_34409741的博客 127

Transformer实战(32)——Transformer模型压缩

在本节中,我们学习了如何在硬件资源受限的情况下减轻运行大模型的负担。我们介绍了如何通过蒸馏、剪枝和量化从训练好的模型中提取高效模型。预训练轻量级的通用语言模型(如 DistilBERT) 可以在各种任务上进行微调,并表现出与非蒸馏模型相当的性能。随着数据量的不断增加,我们希望模型能够更快地运行,在这方面,高效 Transformer 起着至关重要的作用。

盼小辉丶的博客 2772

VC中应用ADO连接SQL数据库

连接字符串:  CString strConn = "Data Source=TEST;Initial Catalog=TEST1";//TEST为服务器名称,TEST1为数据库名称。CString strUser="admin";//用户名称CString strPassword="admin";//密码下面的函数调用ADO类的openDB函数,连接为:http://blog

龙宇网的专栏 2326

在 SAP SD(销售与分销)模块中,销售合同 / 订单的抬头(Header) 和行项目(Item) 核心数据表如下,按 “核心表 + 扩展表” 分类说明,同时区分销售合同(Contract,类型 W

SAP SD模块中销售合同/订单的核心数据表分为抬头和行项目两类。核心抬头表包括VBAK(基础数据)和VBUK(状态数据),核心行项目表包括VBAP(基础数据)和VBUP(状态数据)。扩展表包含VBAKE(抬头增强)、VBAPe(行项增强)、VBEP(计划行)、VBFA(凭证流)等。销售合同(WK/WC)和订单(OR)通过VBAK-AUART字段区分,核心表结构相同。查询时需注意单据类型筛选,并通过VBELN主键关联抬头和行项数据,KNUMV关联定价条件,VBFA表追踪凭证流。

金牌架构师 1096

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

VC6.0利用ADO技术连接sql2000的几种方法

CString   strAdoConstr; CString   strAdoCPU; strSecondUserName= "sa "; strAdoConstr.Format( "Provider=SQLOLEDB.1;Persist   Security   Info=True;Data   Source=%s;Initial   Catalog=%s;User   ID=%s

水上漂的专栏 2994

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Microsoft ADO(ActiveX Data Object)用法浅析

一、ADO简介         ADO(ActiveX   Data   Object)是Microsoft数据库应用程序开发的新接口,是建立在OLE   DB之上的高层数据库访问技术,请不必为此担心,即使你对OLE   DB,COM不了解也能轻松对付ADO,因为它非常简单易用,甚至比你以往所接触的ODBC   API、DAO、RDO都要容易使用,并不失灵活性。本文将详细地介绍在VC下如何使用

fengzhishang2019的专栏 5012

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

数据库编程总结

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 数据库编程总结当前各种

hggugfn的博客 366

VC编程中利用ADO方式访问SQL Server 2012数据库- 连接数据库 转载

VC编程中利用ADO方式访问SQL Server 2012数据库(1)- 连接数据库 转载  Sacomplex 786次阅读 2017-06-10 关注 1、ADO对象及其智能指针 ADO是进行SQL Server数据访问的最常用的方式。ADO中与数据库相关的对象主要有三个:连接对象 Connection、记录集对象 Recordset 和命令对象 Command,它们对应的智能指针分别是_C...

WZD023的博客 426

Ado方式连接Sql数据库(vc++) 已验证

 HRESULT hRet;  try {   hRet = m_pConnection.CreateInstance("ADODB.Connection");  if (SUCCEEDED(hRet))  {      hRet = m_pConnection->Open("Provider=sqloledb;/    Initial Catalog=BookManage;User ID=sa;

每天积累一点点 980
上一篇: VC ADO访问MySql数据库(MySql数据库初探二)
下一篇: VC ADO连接Access数据库
BlueMap
博客等级 码龄17年 114粉丝 22原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值