November 17, 2006 at 12:13 pm
The homemade kind .
It copies the system tables and displays the data about the same way SSMS does. It also seconds as a documenting tool for access where you can do some pretty tricky searches (like find all occurences in the code, server AND client side where the word Orders is found, the results come in with object name, object type, line of occurance and character of occurance). It was developped with and for sql server 2000. But I think it would be quite easy to make it work for 2K5.
The hidden greateness of this program is that it can generate code for VBA, VB6, C#, VB .NET and ASP.Net. It can also generate the code to only execute the proc or return a disconnected recordset. Options for C# and .Net : ("ExecuteNonQuery", "ExecuteReader", "ExecuteScalar", "Fill DataSet"). This in itself is good. The great part is that it can also generate all the basic procs for all the user tables (insert, update, select, delete). I just did a test run on a celeron 2 Ghz and it generated 16K rows of code for calling the procs in less than 1 second. Now the code to generate the procs is somewhat slower but when you put those 2 together you pretty much save yourself a few days/weeks of work per new project . I would guess that starting from scratch, you could create the sps and access code to the sps in less than 5 minutes for a 1000 tables system. The only thing missing in that monster is templating. If it had that I could go commercial with it .
November 28, 2006 at 8:18 am
Oh, it's always so stupid and obvious isn't it? What a silly little boy I am...
Compare the code that didn't work to the other code I posted that did... one all-essential line is missing from the one that didn't work:
cmd.CommandType = Data.CommandType.StoredProcedure
I just noticed when typing up another piece of code and nearly missed it that time, and just thought, "Oh no... it wasn't, was it?"
It was!
November 28, 2006 at 8:24 am
, can't believe I missed it too... I guess it's been too long since I wrote this kind of code manually. Looks like I need to brush back up on this type of code too .
August 10, 2007 at 7:45 am
Guys thanks, even i had similar problem. This post has helped me a lot, but still i wonder what was wrong in the first code. If anybody has answer please post it.
August 10, 2007 at 8:21 am
That line was missing :
cmd.CommandType = Data.CommandType.StoredProcedure
May 8, 2008 at 2:11 am
it's definitely the specifying that the command is a stored procedure.
I've been having the exact same problem for a day and to no avail, but luckily found this thread and have fixed the problem! Thank you!
I added
CmdImage.CommandType = CommandType.StoredProcedure
rather than using text
and it worked for my command. I guess its the way it prepares the string or the sp in sql server it uses that makes the difference
Viewing 6 posts - 16 through 20 (of 20 total)
You must be logged in to reply to this topic. Login to reply