Execute a stored procedure from Visual Basic 2008 express

X

Xand3ros

Hi, sorry for what will most likely be seen as a noob question, but
here we go.

in SQL 2000 i have a Stored Proc, (lets call it sp_xxx)
this stored proc requires three pramaters to run as shown below,


EXEC sp_xxx 'param1','param2','param3'


the stored proc runs fine,
my dilemma is that now i have created this lovely stored proc,
management want it to be encased in a lovely GUI.


sadly i am fluent in SQL not VBA.


i can make a VB form (very basic one) and do very basic things, but
what i need to know is the following


1. how do i execute a stored proc from VB (im using Visual basic
express 2008)
2. if possible how do i then have a page that gives the option to
view
on screen or print???


Noobish i know but as i said, fluent in SQL not VBA


Any help is GREATLY APPRECIATED.


Many thanks
 
T

Trammel

Xand3ros said:
Hi, sorry for what will most likely be seen as a noob question, but
here we go.

in SQL 2000 i have a Stored Proc, (lets call it sp_xxx)
this stored proc requires three pramaters to run as shown below,


EXEC sp_xxx 'param1','param2','param3'


the stored proc runs fine,
my dilemma is that now i have created this lovely stored proc,
management want it to be encased in a lovely GUI.


sadly i am fluent in SQL not VBA.


i can make a VB form (very basic one) and do very basic things, but
what i need to know is the following


1. how do i execute a stored proc from VB (im using Visual basic
express 2008)
2. if possible how do i then have a page that gives the option to
view
on screen or print???


Noobish i know but as i said, fluent in SQL not VBA


Any help is GREATLY APPRECIATED.


Many thanks

Wait... you tried google first, yeah?
http://216.239.59.104/search?q=cach...e.php/3505836+VBA+SQL+Exec&hl=en&ct=clnk&cd=4
 
C

Cor Ligthert[MVP]

Xandros,

For you start you have to know what is Visual Basic 2008 express and what is
Visual Basic for Application, which start both with a V. Almost the same as
Cobol and C#, those start both begin with a C.

In fact you have to search for:
SqlConnection
SqlDataAdapter
SqlDataTable
SqlParameters

This does not matter if it is for managed C#, VB or C++.

You cannot use it with VBA.

The best places to start your search, there where you have downloaded your
VB and Google newsgroups.


Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top