I can't see any parameters used by my stored procedures

JimJim Posts: 4
edited November 20, 2006 7:43AM in SQL Toolkit Previous Versions
I can't see any parameters used by my stored procedures, am I doing something wrong? Every stored procedure has a parameter count of zero.

private void button1_Click_Old(object sender, EventArgs e)
{
ConnectionProperties cp = new ConnectionProperties("server","db","user","pw");
cp.IntegratedSecurity=false;
Database db = new Database();
db.Register(cp,Options.Default);
foreach (StoredProcedure sp in db.StoredProcedures)
{
Debug.WriteLine("");
Debug.WriteLine(sp.Name+ " - has " + sp.Parameters.Count.ToString() + " parameters.");
foreach (Parameter p in sp.Parameters)
{
Debug.WriteLine(p.Name);
}
}
}

Comments

  • Has anyone successfully accessed stored procedure parameters using the toolkit? It seems pretty straight forward, but my stored procedure parameters collections are always empty.

    I'd love to hear from someone who has done it. I don't know what else to do at this point.

    One thing I noticed is that we don't put () around our paremeters. I saw () used in someones sample code. I put () around our parameters and it not make a difference. The RG api still does not reveal any parameters for us.

    Thanks for you help,
    Jim
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Jim,

    I have noticed the same thing. I will contact one of our development staff and see if they know the reason for this. My suspicion is that this is probably an internal property that was added for one of our other products that is using the same engine (possibly SQL Refactor) and that the Parameters are only populated when registering the database for Refactor (a method which is not accessible using SQL Toolkit).
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Jim,

    It seems to work on SQL Server 2005 databases, but not on SQL 2000 databases. This is an issue that is known by our developers and is being worked on in conjunction with Microsoft.
  • Brian,

    We look forward to using this functionality, what is your update/release policy. Do you make updated releases on a regular basis?

    Thank-you for looking into it.

    Jim
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Jim,

    These days we stick to a release schedule unless something terribly important comes up. There will be a version 5.3 coming soon, but I don't know if this will be addressed by then.
Sign In or Register to comment.