C# Newby Question from a VB.NET Programmer

  • Thread starter Thread starter Fred Nelson
  • Start date Start date
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
 
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.
 
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...
 
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
 
Back
Top