一些不常见的ASP调用存储过程的技巧

反激变压器设计学习笔记 反激变压器匝比感量设计 阅读详情
1、最简单的如下
Dim objConn
Set objConn = Server.CreateObject("ADOBD.Connection")
objConn.Open Application("Connection_String")
'Call the stored procedure to increment a counter on the page
objConn.Execute "exec sp_AddHit"
没有参数,没有返回,没有错误处理,就是这个了

2、带参数的一种调用
objConn.Execute "exec sp_AddHit 'http://www.aspalliance.com', 1"
请注意分割参数,该方法也不返回记录

3、返回记录的
Dim objConn
Dim objRs
Set objConn = Server.CreateObject("ADOBD.Connection")
Set objRs = Server.CreateObject("ADOBD.Recordset")
objConn.Open Application("Connection_String")
'Call the stored procedure to increment a counter on the page
objRs.Open objConn, "exec sp_ListArticles '1/15/2001'"
'Loop through recordset and display each article
4、……
Dim objConn
Dim objCmd

'Instantiate objects
Set objConn = Server.CreateObject("ADODB.Connection")
set objCmd = Server.CreateObject("ADODB.Command")
conn.Open Application("ConnectionString")

With objCmd
.ActiveConnection = conn 'You can also just specify a connection string here
.CommandText = "sp_InsertArticle"
.CommandType = adCmdStoredProc 'Requires the adovbs.inc file or typelib meta tag

'Add Input Parameters
.Parameters.Append .CreateParameter("@columnist_id", adDouble, adParamInput, , columnist_id)
.Parameters.Append .CreateParameter("@url", adVarChar, adParamInput, 255, url)
.Parameters.Append .CreateParameter("@title", adVarChar, adParamInput, 99, url)
.Parameters.Append .CreateParameter("@description", adLongVarChar, _
adParamInput, 2147483647, description)

'Add Output Parameters
.Parameters.Append .CreateParameter("@link_id", adInteger, adParamOutput, , 0)

'Execute the function
'If not returning a recordset, use the adExecuteNoRecords parameter option
.Execute, , adExecuteNoRecords
link_id = .Parameters("@link_id")
End With

5、存储过程的代码
Create PROCEDURE dbo.sp_InsertArticle
(
@columnist_id int,
@url varchar(255),
@title varchar(99),
@description text
@link_id int OUTPUT
)
AS
BEGIN
INSERT INTO dbo.t_link (columnist_id,url,title,description)
VALUES (@columnist_id,@url,@title,@description)

SELECT @link_id = @@IDENTITY
END
2023年5月青少年软件编程Python等级考试四级真题(含答案和解析) 电子学会,2023年5月,青少年软件编程,Python等级考试,四级真题(含答案和解析) 阅读详情

相关推荐

数据仓库ODS层详解- 功能、设计与最佳实践

数据仓库ODS层是大数据分析的基石,为企业决策提供可靠数据源。本文深入探讨ODS层设计原则、实施要点和最佳实践,涵盖金融、零售等行业应用。重点关注云环境下ODS层部署策略,以及实时数据集成、数据湖技术等创新趋势。文章还分析了数据体量增长、实时性需求等挑战,提供实用解决方案。whether助您构建高效、安全、可扩展的ODS层,为数字化转型奠定坚实基础。#数据仓库 #ODS层 #大数据分析 #云计算 #数据湖

一个8年大数据开发工程师的碎碎念 1万+

一些不长见的ASP调用存储过程的技巧

1、最简单的如下 Dim objConn Set objConn = Server.CreateObject("ADOBD.Connection") objConn.Open Application("Connection_String") Call the stored procedure to increment a counter on the page objConn.Execute "

WEB DEVELOP 810

从仿真到流片:手把手教你优化65nm CMOS电荷泵的电流匹配与稳定性

本文详细介绍了在65nm CMOS工艺下优化电荷泵电流匹配与稳定性的工程实践指南。通过蒙特卡洛仿真、运放反馈结构版图技巧和全差分结构设计,实现优于1%的电流匹配精度和±2%以内的电流稳定性,特别针对current mismatch问题提供了有效的解决方案。

weixin_42522320的博客 415

ASP脚本如何调用Oracle存储过程

ASP脚本如何调用Oracle存储过程摘自 久久网络一、ASP动态网站开发技术  随着人们对因特网认识的加深和IT技术的发展,一成不变的静态网页已经越来越满足不了信息交互和电子商务的需求,因此以数据库为核心开发能够实现信息交互和个性化服务的网页已经成为一种潮流。为了迎合动态交互式网页的开发趋势,出现了可以与后台数据库进行互动的Web开发技术,目前比较流行的一类是建立在微软Windows平台

itzhiren的专栏 2026

【编号326】全国地灾数据全国25万多个地质灾害点空间分布数据

全国地质灾害点分布数据涵盖25万多个各类灾害点信息,为灾害防治提供重要依据。通过分析灾害分布规律,可识别高风险区,指导监测预警、应急避险和基础设施建设。多地成功案例(如湖北兴山崩塌避险、重庆长寿滑坡预警、湖南"挪床行动")证明,提前预警和科学防治能有效避免人员伤亡。云南省2024年通过预警体系成功避让31起灾害,保护1342人生命安全。这些实践表明,地质灾害防治需结合科技手段与群防体系,实现早预警、早处置。

千奇百怪无奇不有 1467

DAC60501与STM32的I2C通信实战:从寄存器配置到电压输出

本文详细介绍了如何使用STM32通过I2C通信驱动DAC60501数模转换器,实现精确的模拟电压输出。内容涵盖从硬件连接到软件模拟I2C驱动编写,再到DAC寄存器配置与电压计算的全流程实战指南,并提供了关键的驱动实例代码和常见问题调试技巧,帮助开发者快速掌握这一嵌入式开发中的实用技能。

weixin_29197835的博客 365

ASP调用存储过程的技巧

导读:   1、最简单的如下   Dim objConn   Set objConn = Server.CreateObject(ADOBD.Connection)   objConn.Open Application(Connection_String)   Call the stored procedure to increment a counter on the page

sunfollowme的专栏 650

手把手教你驱动6脚三位一体数码管:从引脚分析到C语言扫描代码实战

本文详细解析了如何逆向工程并驱动6脚三位一体数码管的全过程,从引脚分析到C语言扫描代码实战。通过系统化的测试和优化,作者总结出一套高效的驱动架构和调试方法,适用于工业设备中的非标准数码管应用。

weixin_42632434的博客 212

asp调用存储过程

ASP与存储过程(Stored Procedures)的文章不少,但是我怀疑作者们是否真正实践过。我在初学时查阅过大量相关资料,发现其中提供的很多方法实际操作起来并不是那么回事。对于简单的应用,这些资料也许是有帮助的,但仅限于此,因为它们根本就是千篇一律,互相抄袭,稍微复杂点的应用,就全都语焉不详了。    现在,我基本上通过调用存储过程访问SQL Server,以下的文字虽不敢保证绝对正确,但都

xiaolei1982致力于Web开发 1393

最详细的 SAP ABAP Web Service 创建和消费步骤讲解

本文原版发表于 SAP 官方社区,当时用的英文版写作,标题为:Step by step to create, consume and trace web service in ABAP system https://blogs.sap.com/2014/05/20/step-by-step-to-create-consume-and-trace-web-service-in-abap-system/ 总共阅读量超过 18 万。 How to create web service provider in A

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 3149

YOLOv13保姆级教程+AKConv模块:可变形卷积+自适应核优化,mAP提升3.23%,召回率&mAP50~95显著提升(论文涨点模块已验证)

本文介绍了一种改进的YOLOv13-AKConv模型,通过引入AKConv模块显著提升了目标检测性能。实验结果表明,优化后的模型(绿色曲线)相比原模型(蓝色曲线)在mAP指标上提升了3.23个点,同时召回率、mAP50-95等指标均有明显提升。作者详细阐述了模型移植过程,包括创建yolov13-AKConv.yaml配置文件,修改tasks.py和modules/init.py文件,以及实现AKConv模块的核心代码。该模块采用可变形卷积思想,通过动态生成采样点位置来增强特征提取能力,并集成了BN和SiLU

FJN110的博客 2611

ASP调用存储过程

ASP与存储过程(Stored Procedures)的文章不少,但是我怀疑作者们是否真正实践过。我在初学时查阅过大量相关资料,发现其中提供的很多方法实际操作起来并不是那么回事。对于简单的应用,这些资料也许是有帮助的,但仅限于此,因为它们根本就是千篇一律,互相抄袭,稍微复杂点的应用,就全都语焉不详了。    现在,我基本上通过调用存储过程访问SQL Server,以下的文字虽不敢保证绝对正确,但都

骆枫专栏 897

液态神经网络(Liquid Neural Networks)从线虫大脑到下一代 AI

液态神经网络(Liquid Neural Networks,LNN)是一类具有动态内部结构的神经网络,其灵感来源于生物神经系统,尤其是大脑中神经元如何以复杂、非线性的方式响应外部刺激。与传统神经网络不同,液态神经网络的每个神经元在处理输入时,不再是静态线性或非线性变换,而是基于一个微分方程模型进行响应。这种建模方式使神经元的行为具有时间连续性和动态适应性。换句话说,它不仅“记住”过去的信息,还能根据当前环境实时调整自身的动态特性,这对于感知、决策、预测等任务都非常关键。

hello.reader 7408

在ASP中调用存储过程

在ASP中调用存储过程: ----   存储过程(Stored-Procedure)是由一些SQL语句和控制语句组成的被封装起来的过程,它驻留在数据库中,可以被客户应用程序调用,也可以从另一个过程或触发器调用。它的参数可以被传递和返回。 ----   ASP包含的ADO(ActiveX Data Object)即ActiveX数据对象技术与ASP相结合提供了强大的站点数据库访问功能。ADO具有操作

WEB技术 754

深度学习工具包 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")

假人有限元模型

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

在asp中调用sql server的存储过程

在asp中调用sql server的存储过程可以加快程序运行速度,所以这些天在研究asp中利用sql server的存储过程,现总结如下,其中很多思想也是直接从chinaasp论坛中得出来,希望能给大家一些帮助。1.调用存储过程的一般方法先假设在sql server中有一存储过程dt_users:CREATE PROCEDURE [dbo].[dt_users] ASselect * from u

xxxhn的专栏 1077

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

ASP调用存储过程:返回多个记录集的存储过程

  7. 返回多个记录集的存储过程  本文最先介绍的是返回记录集的存储过程。有时候,需要一个存储过程返回多个记录集,在ASP中,如何同时取得这些记录集呢?为了说明这一问题,在userinfo表中增加两个字段:usertel及usermail,并设定只有登录用户可以查看这两项内容。 /*SP7*/CREATE PROCEDURE

kingwkb的专栏 4608

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

ASP 调用sqlserver存储过程学习教程

一、我先来来说一说调用存储过程的优点与缺点:       1、SQL语句已经预编绎过了,因此执行效率、性能大大增加。       2、可以接受参数、输出参数、返回单个或多个结果集以及返回值。可以向程序返回错误原因。       3、减少网络流量。如:执行插入记录这个功能时只要传输存储过程名、参数和这些参数的数值即可。免去写一大串操纵的SQL语句。 我们将会发现要是网络速度慢时这

andyjiang博客 1011

ASP调用存储过程:有输入参数和输出参数的存储过程

  4. 有输入参数和输出参数的存储过程  返回值其实是一种特殊的输出参数。在大多数情况下,我们用到的是同时有输入及输出参数的存储过程,比如我们想取得用户信息表中,某ID用户的用户名,这时候,有一个输入参数----用户ID,和一个输出参数----用户名。实现这一功能的存储过程如下: /*SP4*/CREATE PROCEDURE dbo

kingwkb的专栏 5569

ASP调用存储过程的方法

----ASP调用存储过程的方法----调用存储过程的方法需要使用ADO的Command对象。Command对象是对一个数据源运行特定命令的定义(例如,一个SQL查询或一个SQL存储过程)。下面以MSSQLSERVER6.5为后台数据库,介绍ASP调用存储过程的方法。----例如,在表User中保存了用户名和密码,现在建立一个检查密码的存储过程sp_CheckPass来检查用户是否输入了合

Rock 767
上一篇: 一些不长见的ASP调用存储过程的技巧
下一篇: windows命令大全
webdevelop
博客等级 码龄24年 2粉丝 8原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值