473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to call stored procedure in vb?

this is my stored procedure... how can i get the value of a datetimepicker1 in vb.net form and stored it in @date1 and @date2
Expand|Select|Wrap|Line Numbers
  1.  
  2. CREATE PROCEDURE SAT
  3.  
  4.     @date1 datetime,
  5.     @date2 datetime
  6. AS
  7.  
  8.     SELECT DISTINCT cnsgne, broker,
  9.         COUNT(case when cntsze=20 then cntsze end) as '20',
  10.         COUNT(case when cntsze=40 then cntsze end) as '40',
  11.         COUNT(case when cntsze=45 then cntsze end) as '45'
  12.     FROM CYMgps
  13.     WHERE (sysdte BETWEEN @date1 and @date2)
  14.     GROUP BY cnsgne, broker
  15.     ORDER BY cnsgne asc
  16.     RETURN
  17.  
  18.  
  19.  
Jan 16 '13 #1
0 908

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Luis | last post by:
I'm using code similar to the following in an asp page to call a stored procedure that does a select on a SQLServer 2000 table: dim rs, SelectSql SelectSql = "EXEC spSelectStuff @param = '" &...
2
by: syoung | last post by:
I would like to know if anyone knows how to execute a stored procedure from ASP.NET 2.0. I'm using the NorthWind database and I'm trying to execute the "CustOrderHist" stored procedure. The...
1
by: Jenny C. | last post by:
Hi I am fairly new to .NET, and I am having a hard time to call a stored procedure from C# code in a windows application I have tested my connection (and login) several time and it is OK. If I...
6
by: Sam | last post by:
I had created stored procedure at SQL Server 2000 and how do I call it via ASP.Net using VB Language? CREATE PROCEDURE STK As if exists (select * from dbo.sysobjects where id =...
3
by: sarma | last post by:
Hi friends, I created a stored procedure in MySQL like create procedure p() select NOW(); I write a C program, from which i wish to call this stored procedure, i used both...
3
by: JM | last post by:
Hi, I am using SQL Server 2000 and ASP.NET 2.0 and want to call a stored procedure using Latest Enterprise Library 2.0. My stored procedure has 3 input parameters: CustId (int), RefId(int) and...
1
by: eholz1 | last post by:
Hello PHP Group, Is there any advantages (or disadvantages) in using mysqli instead of mysql (querys, connections to database, etc). I am currently using mysql_connect, and things like this:...
0
by: pbaillard | last post by:
Here a sample to call a stored procedure with an Oracle Database. odc.Connection = m_cDb ' use an open connection to your database odc.CommandType = CommandType.StoredProcedure odc.CommandText =...
2
by: E11esar | last post by:
Hello there. I am going in bit of a circle with this matter; First some background: I am trying to upload the details of a CSV file into an Oracle table. I am using a StreamReader to copy a line...
3
akashazad
by: akashazad | last post by:
Hi Friends My question is "can we call Stored Procedure from a User Defined Function in SQL" If yes then pl tell me how? If No then pl tell me why not ? While I was trying finding...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.