|
 |
|
|
This is a very good codegen ! But! I think there is a possibility to slightly increase performance. To do this it is necessary to initialize commands and parameters once a time, not each time when I call Invoke method.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I am using Visual Studio 2003 and C#. The stored procedure is a simply insert in oracle. Thanks a lot.
|
| Sign In·View Thread·PermaLink | 1.33/5 (3 votes) |
|
|
|
 |
|
|
SP/Invoke worked great on MSVS2003 (.Net 1.1), no problems. However, when I recently moved my project to .NET 2.0, the compiler could not find the SP/Invoke tool for the XML ("Custom tool not found on system"). I compiled the SPInvoke project on MSVS2005 and re"regasm"ed it, but it did not help as well.
Did anyone manage to use this project on .NET 2.0 or had my problem and fixed it? Please help, thanks
|
| Sign In·View Thread·PermaLink | 2.33/5 (3 votes) |
|
|
|
 |
|
|
Hi Simon. I can't get you on the email address supplied in this article so I'm posting in the discussion area here.
I've just been fortunate enough to stumble across your SPInvoke app (whilst looking for something completely unrelated). Isn't it always the way with CodeProject? Anyway, it's a great little design you have, I congratulate you. I plan to introduce it into our dev process.
We use VS2005 and SQL2005 and I've just gone through the app and replaced all the deprecated code. In case you haven't done this yourself, I will happily return the converted app back to you by way of thanks, if you want it (so long as you accept that it's not been fully tested as yet)
Additionally, I have used the app slightly differently from your published instructions. I don't know if this applies to earlier versions of VS but in VS2005 you can specify custom build tool for a given file extension. So, instead of leaving the source files as .XML I simply called them .SPI and set up SPInvoke as the build tool. Now I just add an XML file, save it as say MyFile.SPI and I can skip setting up the Custom Tool property. There are some additional registry entries that are needed to get the tool working under VS2005 so I have these too if you want them.
I also plan (at some point) to modify it to use a VS DB connection instead of the having the settings in the XML file itself. This would make it a little more robust when sharing projects in a team environment.
If you want all this info, I can bundle it up and send it to you. I won't clutter your inbox with this stuff if you've already done it though.
Many Thanks
--------- ~swg
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
Hi SWG
I saw yor reply t hte original post. what you did and planned on doing is what i was hoping to find. I would love to see the changes you have made to the original code along with the reg entries...
I was wondering it you could share it with us.
Thanks
SC.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
In the row classes there is code like the following: reader.GetValue(1)
Is there anyway to configure to use column names like reader["ColumnName"] within these generated classes?
I am asking because I have some stored procs that use SELECT * FROM TABLE and I have to change the column orders some times when adding indexes, etc. which breaks the spinvoke generated class.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Ok, I solved this problem by building my own version where it uses indexers with a column name in the code generation for the rowclasses. I was also wondering how you embed the schema in the resx file in case I want to mod or add some options?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi ;
I use Access Data Base and and I need Vb code to validate if the data in field is in UTF-8 or not .
Thank's for your help
regards
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Has anyone made this?
I've setup the XML file's custom tool property, and created the databse and a sample stored procedure, but it's not generating the code... may be SQL 2005 changed a lot so this isn't working anymore?
daniero
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
Below is link of Lattice.SPGen, a stored procedure generator which support Oracle, SQL Server, and IBM DB2 UDB, Lattice.SPGen can generate business entity class in both C# and VB.net as well.
http://www.latticesoft.com
|
| Sign In·View Thread·PermaLink | 1.67/5 (2 votes) |
|
|
|
 |
|
|
A while ago, I searched the internet for a code generator of stored procedures with simple feactures:
- No further modification to the generated code
- Synchronizing with procedure changes
- Directly interacting with data provider methods
- Flexible for effecient use of ADO.Net functionality
- Static data binding
- SQL Server, OleDb, ODBC, Oracle, MySQL data providers
There are a lot of such kind but I had no success.
Now, I have created one and if you are interested, take a look at http://www.povb.com/posharp
Chris Liang
|
| Sign In·View Thread·PermaLink | 1.67/5 (2 votes) |
|
|
|
 |
|
|
... or just use one of the many free tools like MyGeneration : www.mygenerationsoftware.com
Kind regards, thomas
People who wait until the eleventh hour to call on Jesus die at 10:30.
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
If suppose we have store procedure as follows
CREATE PROCEDURE dbo.GetCount
( @country varchar(11), @Count int OUTPUT )
AS SET NOCOUNT ON Select @Count = count(customerid) from customers where country = @country
RETURN GO
How do we use this tool for the above kind of stored procedure?
GetCount.Result result = GetCount.Invoke(conn, "USA", ref count);
Tha above usage gives me an error message
Thanks in advance
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
Ideally the custom tool should auto generate the XML file with all stored procedures from a given database. (just a thought)
Oliver
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
hi i wan to ask how does this program run ?? does this program need any other things in order to run this program code? when i run the code in visual studio.net it prompt me the following error:- 1) Program 'C:\Documents and Settings\ipcl\Desktop\denise work folder\SPInvoke\Visual Studio .NET 2003\SPInvoke\obj\Debug\SPInvoke.exe' does not have an entry point defined 2) C:\Documents and Settings\ipcl\Desktop\denise work folder\SPInvoke\Visual Studio .NET 2003\SPInvoke\StoredProcedures.xml The custom tool 'objectnation.SPInvoke' failed. SQL Server does not exist or access denied.
can any plz help me . thanx alot denise
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
The documentation included with SP/Invoke contains detailed instructions on how to use it from within Visual Studio .NET.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
my procedure inserts a record and ends with
"return select @@IDENTITY"
now logic would dictate that the returnvalue of my object would have that identity in it, but it doesn't. why?
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
First of all I would like to say how amazing this tool is. Great job.
Is it possible to return multiple tables in one stored procedure call?
-- Objectnation xml <storedProcedureClass source="spReturn2Tables" access="public"> <rowClass /> </storedProcedureClass>
--DB Create PROCEDURE [dbo].[spReturn2Tables] AS select * from table1 Select * from table2 GO
When I use the above code only the fisrt table is returned as a strong typed object.
Thanks David
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi David
I'm afraid that this isn't currently possible. Modifying the generated code to extract from multiple tables wouldn't be very difficult. However, extending the tool's internal meta-data structures to describe multiple result sets would require a good deal of thought and is therefore something that will probably have to wait for the next major release.
We don't currently know when the next release will be completed but I doubt it will be before the end of the year - sorry...
Best regards,
Simon Wilson
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
This tool is very cool. There is one feature that I would like included and that is to allow the attribute access="internal" within the <storedProcedureClass> element to generate classes with internal access.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
You can use the access attribute on the storedProcedureClass element to specify the access individually for that stored procedure class. See section 8.4 in the documentation.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I´m looking for a royalty free NAX for .NET. Almost anyone I see, are created in Java.
Someone knows any native database written or developed for using in .NET?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Try Mattisse, www.mattise.com, a Post-Relational database that isnt exactly an XML database, but more of a Class type of database storage
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |