C# Newby Question from a VB.NET Programmer

F

Fred Nelson

Hi:

I've been working with VB.NET for over a year writing web applications. Now
I'm going to be writing web applications in C#. So far everything that I
need to do has been going pretty well with one exception:

I need to make a class library that I can will use for all my operations
with an SQL database. Every operation will call a stored procedure - no
exceptions.

I have two books that have absoutely no examples of how to do this. For
some reason I can't get this to work in C# and I know its just a semi-colon
here or there that prevents it.

I've searched the web and don't find any "intro" examples either. (When I
learned VB.NET for web apps I got a copy of "ibuyspy" and that worked pretty
well)

Does anyone know a good resource for this - preferably with a good code
sample - I would GREATLY appreciate it.

Thanks very much,

Fred
 
B

Bob Powell [MVP]

Did you try opeing the database in the Server Explorer and simply dragging
the stored procedure onto your webform?

Works pretty well for me.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
M

Michael C#

What do you need help with? Actually calling the stored procedures from C#?
Start by checking out these topics in MSDN:

System.Data.SqlClient namespace
SqlCommand
SqlConnection
SqlDataReader
SqlParameter
recordset
parameterized queries

If you have specific examples of what you're looking for and/or can post
problem code, it will be a little easier to give you more specific advice...
 
F

Fred Nelson

Michael:

Thank you for your reply.

What I was really looking for was an example of a class library in C# that
had functions to call stored procedures.

Since I send my e-mail I have found a C# version of the old "Ibuyspy" setup
and I have an example that I can work with.

Thanks for your help - I'm sure I'll have more questions!

Fred
 

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