u41c
u41c
CC#
Created by u41c on 11/5/2023 in #help
✅ Stored Procedure Help
Hello, I have a stored procedure in my project called spGetVendor. It takes one parameter, @VendorID. I've instantiated a new SqlCommand object that can be used to interact with the stored procedure and I've passed the parameter to it. When I try to use it however, it says that the parameter has not been passed?? Any ideas?
public static Vendor GetVendor(int vendorID)
{
Vendor vendor = new Vendor();
SqlConnection connection = PayablesDB.GetConnection();
//string selectStatement =
// "SELECT VendorID, Name, Address1, Address2, City, State, " +
// "ZipCode, Phone, ContactFName, ContactLName, " +
// "DefaultAccountNo, DefaultTermsID " +
// "FROM Vendors " +
// "WHERE VendorID = @VendorID";
SqlCommand selectCommand = new SqlCommand("spGetVendor", connection);
selectCommand.Parameters.AddWithValue("@VendorID", vendorID);
public static Vendor GetVendor(int vendorID)
{
Vendor vendor = new Vendor();
SqlConnection connection = PayablesDB.GetConnection();
//string selectStatement =
// "SELECT VendorID, Name, Address1, Address2, City, State, " +
// "ZipCode, Phone, ContactFName, ContactLName, " +
// "DefaultAccountNo, DefaultTermsID " +
// "FROM Vendors " +
// "WHERE VendorID = @VendorID";
SqlCommand selectCommand = new SqlCommand("spGetVendor", connection);
selectCommand.Parameters.AddWithValue("@VendorID", vendorID);
4 replies
CC#
Created by u41c on 10/28/2023 in #help
❔ Visual Studio build error: "mark of the web"???
No description
16 replies
CC#
Created by u41c on 9/19/2023 in #help
Inventory Maintence Project Issue
I have two forms, one that lets you enter data for a new item. Once you hit Save, it should create a new InvItem object and add it to a list of inventory items and display it in the list. I can't seem to figure out how to get it to add the item. Any suggestions?
20 replies
CC#
Created by u41c on 9/18/2023 in #help
Instantiating a new object failed?
No description
5 replies