|
The Runtime Callable Wrappers (RCWs), or COM interop assemblies, generated by .NET Framework tools and the IDE are attributed with the interface and class GUIDs defined in the typelib that you're importing. So, just like COM, if a newer version of a library supports the older versions of the interfaces, you can use the new library through the old object model since the contract is honored.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Does anyone have experiece with using ms access databases with C#?
I was wondering how fast and efficient the access is.
I am writing AI for an AI tournament and was considering using an MS ACCESS DB to store stuff. However, our moves have to be made in 6 secs or less..therefore it has to be fast access if I used this approach
|
|
|
|
|
mweston wrote:
I was wondering how fast and efficient the access is.
If you want to use it only in a desktop, its effieient enough and not as expensive as SQLServer, you can also use MSDE which I think is free and its SQL engine.
Mazy
No sig. available now.
|
|
|
|
|
MSDE is the Microsoft Desktop Engine, and shares most of its components with SQL Server. This can be a hefty install, though. It is definitely faster than Access (and has specialized classes for access it through ADO.NET using the System.Data.SqlClient namespace elements) but it's only free if you have a license for a qualifying product like SQL Server, Access, FrontPage (last I checked), Visual Studio .NET, and perhaps a few others. You can find more information at http://www.microsoft.com/sql/msde/[^].
As far as the speed of Access is concerned, you have to take account for a few things. First, to access Access you must use the generic OLE DB support in ADO.NET (using the Access OLE DB provider) using the System.Data.OleDb namespace elements. This provides generic access through the abstract OLE DB provider implementations so some things you can do in Access won't be possible through ADO.NET. Second, it depends on whether you use a DataSet (think of it as a disconnected recordset) or an OleDbReader . A DataSet takes a while to construct (less if you use a strongly-typed DataSet which you can create in VS.NET easily enough) but provides many advantages like serialization, filtering, relationships, referential integrity, and more. If you use an OleDbReader , it will increase access times but then you must parse and relate (if necessary) any data you read yourself.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
mweston wrote:
However, our moves have to be made in 6 secs or less..
It sounds like your tournament involves a strategic 2 player adversary game? Possibly checkers or connect four? If this is the case then I would definitely recommend against using a database. What exactly are you needing to store?
|
|
|
|
|
Actually we're playing Pentagonia
http://pentagonia.freeyellow.com
I was considering using a database to store past games to try to generate a self-learning AI. However, being new to AI, I am not 100% sure of anything at the moment. =) But, I AM learning.
|
|
|
|
|
I am trying to add an existing resX file to my project and it won't take. Any reason? Are this added differently or create in some other way (new to this .NET stuff)
thanks
Ralph
|
|
|
|
|
What do you mean "it won't take". Please be more technical, as this is a technical forum.
If you mean it won't compile to a .resources file and get embedded in your assembly, right-click on the file, select Properties, and change the Build Action to "Embedded Resource".
If you're new to .NET, you should definitely read the .NET Framework SDK. It contains many topics - including localization with resx files - and the class library documentation for the .NET Framework itself. See http://msdn.microsoft.com/netframework/using/[^] for more information and links to the .NET Framework SDK on MSDN Library Online.
Browsing the MANY articles here on .NET and C# on CodeProject can also be beneficial. There are many examples and code-snippets for all levels of programmers. Just browse the relevent categories.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thanks I will take a peek but I will reiterate. I have 2 projects and am moving some controls from 1 to the other. In the first project, there are a bunch of .resX file in the project tree. I copy those files to my new project directory, try to add them like I would any other file (via context menu). Basically it doesn’t add it to the tree like on would expect. I can add cs files, etc, but not these .resX files. I hope that is a bit clearer.. sorry for the confusion…
|
|
|
|
|
Again, what is the exact error? What exactly won't work? Please be specific.
If you're copying those to your new project directory and trying to add them into that project, you should expect a "file exists" error. Instead, show the hidden files for that project by selecting an item in that project and click the Project menu, then Show All Files. Find the resx file in that directory, right-click, and select Include in Project.
Make sure you take the namespaces changes into account if you didn't override the default namespace for your project (if necessary) in the project configuration settings (right-click on the project and select Properties). In VS.NET, resx files are created using the root namespace of the project, followed by any directories in which the resx files are located, and are finally compiled to .resources file with the namespace and filename prepended.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I clicked show all files and I do see although it looks like it is a link of some sort. I will take a look at the link you sent me....
thanks
Ralph
|
|
|
|
|
I am currently developing C# controls and I need to know if there is a way these controls can be used in an MS Excel sheet. If anyone has a way of doing it, please let me know.
Ryan
|
|
|
|
|
You have to expose them as COM objects and register the assembly on the system with regasm.exe. If you need to access the Excel object model from these controls, you should also create and reference the Microsoft.Office.Interop.Excel.dll primary interop assembly (PIA), downloadable from http://msdn.microsoft.com/downloads/list/office.asp[^]. You can pass objects from Excel to your controls through methods you define, such as passing the Excel.Application object, which is what Excel does to foster automation with VBA (Visual Basic for Applications).
For more information create COM-Callable Wrappers (CCWs), see Nick's article at http://www.codeproject.com/dotnet/nettocom.asp[^].
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I have created a Webservice using Visual Studio .NET 2003. The webservice works fine on my local webserver. I then created a Web Setup project to install/uninstall this webservice. I have tested it on my local machine and everything works fine.
Now, I need to deploy this webservice on my website. The ISP I use supports .NET Hosting v1.0/V1.1. However, how can I run the Web Setup on their server!???
I tried copying the files, but it doesn't work. I changed custom errors mode to be Off, and changed the authorization mode to None. I also changed the .webinfo file to reflect the webservice location.
Any ideas, how this can be done?
phpWebNotes is a page annotation system modelled after php.net.
http://webnotes.sourceforge.net/demo.php[^]
|
|
|
|
|
|
When I use the browser and type:
http://www.example.com/dotNet/MyService/Service1.asmx
I get the following (even when I set the customErrors mode to Off, I still get the same error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
phpWebNotes is a page annotation system modelled after php.net.
<a href="http://webnotes.sourceforge.net/demo.php">http://webnotes.sourceforge.net/demo.php</a>[<a target=_blank title='New Window' href="http://webnotes.sourceforge.net/demo.php">^</a>]
|
|
|
|
|
|
You can copy file there through ftp but don't forget that you have to put it in virtual folder , they have to create it for you or give you some admin privilage to do that. I'm not sure you can run installshield there when you don't have direct access to server. For my web service I copy files in the root of my web site(bin directory_config and asmx files) cause those stupids didn't let me to create virtual directory there.
Mazy
No sig. available now.
|
|
|
|
|
Mazdak wrote:
For my web service I copy files in the root of my web site(bin directory_config and asmx files) cause those stupids didn't let me to create virtual directory there.
What is the difference between having it in the root of the website vs. in a sub-directory? I thought virtual directories are to map internal server paths into sub-folders of wwwroot. In my case, I copied the files to a sub-folder of wwwroot. I attempt to execute the webservice as follows:
http://www.example.com/dotNet/MyService/Service1.asmx
which is similar to how I run it on my local machine:
http://localhost/Service1.asmx
Thanks,
Victor
phpWebNotes is a page annotation system modelled after php.net.
http://webnotes.sourceforge.net/demo.php[^]
|
|
|
|
|
When you create a web service with VS.NET it automaticlly do the setting for you and set that directory as virtual directory so it works without problem, but when you upload your files you have to do setting manually.
Mazy
No sig. available now.
|
|
|
|
|
Makes sense... But what is the benefit of having it as a virtual directory? As I said before, I thought virtual directories are useful to map paths that are not under wwwroot to virtual directories under wwwroot.
Thanks for your help..
Regards,
Victor.
phpWebNotes is a page annotation system modelled after php.net.
http://webnotes.sourceforge.net/demo.php[^]
|
|
|
|
|
Hi!
First of all, I'd like to excuse my stupid question .
However, I'm having probelms understanding the use of simple lookup tables in c#. I do not want to use database to create them, but classes or data structures instead. How can it be accomplished? I'd appreciate if one could explain the idea and the usage thoroughly.
Little more about my problem. I'm implementing an price collection software that fetches prices from multiple web sites. So one item (lets say MS Windows XP professional) may have multiple prices and it's name may me written in multiple ways (such as Win XP Pro or Microsoft Windows XP Professional etc).
Any tips how to overcome this problem? Thanks you for your answers in advance!
Feic Kilmore
|
|
|
|
|
I think the proper way is add a LIKE operation to your query string:
SELECT * FROM mytable WHERE product LIKE 'WIN%'
Or something like this query , I think most web sites use this mechanism. This would gain most of result correctlty.
Mazy
No sig. available now.
|
|
|
|
|
Thanks for your quick response. However, I don't want to use database but classes instead. Any good tips to overcome it?
Feic
|
|
|
|
|
What do you mean exactlyy by not using database? You mean you want it disconnected from DB? So you can use DataSet and its Find() method when you after filling dataset.
Mazy
No sig. available now.
|
|
|
|