Yep a bloody nervous little almost-a-dog. Hate 'em. Gertjan Schuurmans Amsterdam The Netherlands
Gertjan Schuurmans
Posts
-
french slang -
How to use the same db connection with multiple datareaders?;P = Server=SVR1;Database=Northwind;...; Pooling=true" :laugh: Gertjan Schuurmans Amsterdam The Netherlands
-
How to use the same db connection with multiple datareaders?In general, it's not wise to do so. In a single threaded application you might orchestrate these DataReaders to use only one connection (that means one at a time, but that's probably not what you want), but in any multi-threaded environment (like ASP.NET) you will get into all kinds of trouble. Rely on the underlying data provider to perform connection-pooling, and open a connection for each operation. For SQL Server you can specify a connectionstring a la: "Server=SVR1;Database=Northwind;...;Pooling=true" This will force the re-use of connections, and makes opening one a lot cheaper. Gertjan Schuurmans Amsterdam The Netherlands
-
Remoting (events/delegates)Hi there! Yep, I think you are stuck in a two-way dependency: you need a remotable(serializable) server for to call from within the plugin, and a serializble plugin for callback. My guess is to try to narrow this dependency down to a minimal IPlugin interface and a remotable server. hope this helps ;) Gertjan Schuurmans Amsterdam
-
Remoting (events/delegates)Did you look into the soapsuds.exe tool? It generates empty proxy classes from your real class libraries. Gertjan Schuurmans Amsterdam
-
log4net...Use NUnit (and NAnt which is awesome) for team development: daily builds and automated testing are essential whenever you're working with others on a project. I didn't look into Log4net yet; i think it uses the pattern of Listeners which you can attach to a general logging system; just as you can do with the Trace classes in .NET Gertjan Schuurmans Amsterdam The Netherlands
-
General opinion on architecture neededHi Paul, Having this pipeline from Web Service -> Windows Service -> Database and back forces you to write (and debug) a lot of soap and remoting stuff (from outside to the WebSvc and back, from the ASP.NET Web Service to the Windows Service (remoting) and vice versa. Consider the following approach:
Windows UI/Console client \[\*remoted\] | Windows Service | v
Internet <---> ASP.NET <--> Busines Logic DLL <--> Database
^
|
Windows UI/Console client [*simple]This way you can concentrate on core functionality by developing the Busines Logic Class Library and add all kinds of connectivity afterwards. greetings, Gertjan Schuurmans Amsterdam The Netherlands
-
sourcesafe replacementsIt's written in Delphi, isn't it? -> that's always good thing :) My (personal) point of concern is that freevcs stores its data in a RDBMS (at least from what i understand after a quick look at the site). It's what i like most about CVS -> you'll always have a comprehensible, restorable filesystem structure backing your sources. regards Gertjan
-
sourcesafe replacementsWe (8 devel. company) now run CVS-NT server + ViewCVS web interface on a build server. On the client machine we use the plain old command line in conjunction with Tortoise CVS. If you want an intuive CVS interface; use Tortoise! It's brilliant.(http://www.tortoisecvs.org/). You can also try the jalindi dll for Visual Studio 6 and 7. I've been looking at the tigris subversion (subversion.tigris.org) thing and though it looks really clean and neat, it's still in version 0.15 and lacking the massive amount of tools and documentation on CVS. Looks promising however. regards, Gertjan Schuurmans Amsterdam The Netherlands
-
Help!! Forgot my password...Hi there, You still have access to your computer (when you're sitting) at it, don't you? Then why don't you just reset the password (Control Panel | Users and Password) and use the new one for remote control. BTW, it's probably wise to disable autologon especially because since you do remote admin, you'll probably have your computer always connected. gr, Gertjan
-
compilation problem with #importHi there, My guess is that MADLL3 typelibrary implicitly imports typelibs of MADLL2 or MADLL1, this causes all kinds of typedefs to be duplicated in the generated .tlh and .tli files. Gertjan
-
How to get CLSID for the underlying object.soptest's code should be working in most cases, but first check if the object supports IPersist, IProvideClassInfo or IProvideClassInfo2. You can then obtain the class ID in a very simple way through: IPersist::GetClassID() IProvideClassInfo2::GetGUID() gertjan
-
wildcardsHi, this code should do the trick. It's an adapted function from SysInternals' FileMon application. Regards, Gertjan Schuurmans Amsterdam //--------------------------------------------------- // MatchWildCard // //Parameters // LPCTSTR pszWildCard // LPCTSTR pszFileName // //Returns // BOOL // //Remarks // // MatchWildCard tests whether the given filename matches the wildcard. pszWildCard // can contain * and ? special characters. // BOOL MatchWildCard(LPCTSTR pszWildCard, LPCTSTR pszFileName) { #define UpCase(ch) ((ch) >= 'a' && (ch) <= 'z' ? (ch) - 'a' + 'A' : (ch)) TCHAR chFile, chWild; // End of pattern? if (!*pszWildCard) { return FALSE; } // If we hit a wild card, do recursion if (*pszWildCard == '*') { pszWildCard++; while (*pszFileName && *pszWildCard) { chFile = UpCase(*pszFileName); chWild = UpCase(*pszWildCard); // See if this substring matches if (chWild == chFile || chFile == '*') { if (MatchWildCard(pszWildCard + 1, pszFileName + 1)) { return TRUE; } } // Try the next substring pszFileName++; } // See if match condition was met return (*pszWildCard == 0 || *pszWildCard == '*'); } // Do straight compare until we hit a wild card while (*pszFileName && *pszWildCard != '*') { chFile = UpCase(*pszFileName); chWild = UpCase(*pszWildCard); if (chWild == chFile || chWild == '?') { pszWildCard++; pszFileName++; } else { return FALSE; } } // If not done, recurse if (*pszFileName) { return MatchWildCard(pszWildCard, pszFileName); } // Make sure its a match return (*WildCard == 0 || *WildCard == '*'); ================== The original message was: Hi all,
I need an algorith to wildcard match two strings similar to what happens when you do a dir *.* - I`d require it to support both * and ? - nothing too fancy !!Appreciate any help in this !!
Thanks in advance !!Rajiv
-
wildcardsHi, this code should do the trick. It's an adapted function from SysInternals' FileMon application. Regards, Gertjan Schuurmans Amsterdam //--------------------------------------------------- // MatchWildCard // //Parameters // LPCTSTR pszWildCard // LPCTSTR pszFileName // //Returns // BOOL // //Remarks // // MatchWildCard tests whether the given filename matches the wildcard. pszWildCard // can contain * and ? special characters. // BOOL MatchWildCard(LPCTSTR pszWildCard, LPCTSTR pszFileName) { #define UpCase(ch) ((ch) >= 'a' && (ch) <= 'z' ? (ch) - 'a' + 'A' : (ch)) TCHAR chFile, chWild; // End of pattern? if (!*pszWildCard) { return FALSE; } // If we hit a wild card, do recursion if (*pszWildCard == '*') { pszWildCard++; while (*pszFileName && *pszWildCard) { chFile = UpCase(*pszFileName); chWild = UpCase(*pszWildCard); // See if this substring matches if (chWild == chFile || chFile == '*') { if (MatchWildCard(pszWildCard + 1, pszFileName + 1)) { return TRUE; } } // Try the next substring pszFileName++; } // See if match condition was met return (*pszWildCard == 0 || *pszWildCard == '*'); } // Do straight compare until we hit a wild card while (*pszFileName && *pszWildCard != '*') { chFile = UpCase(*pszFileName); chWild = UpCase(*pszWildCard); if (chWild == chFile || chWild == '?') { pszWildCard++; pszFileName++; } else { return FALSE; } } // If not done, recurse if (*pszFileName) { return MatchWildCard(pszWildCard, pszFileName); } // Make sure its a match return (*WildCard == 0 || *WildCard == '*'); ================== The original message was: Hi all,
I need an algorith to wildcard match two strings similar to what happens when you do a dir *.* - I`d require it to support both * and ? - nothing too fancy !!Appreciate any help in this !!
Thanks in advance !!Rajiv
-
I love it!It's a relief to see this site! It looks great, the forum system is great and it's nice to watch a site actually growing (in striking contrast to the now dead codeguru site). I expect codeproject will eliminate a shortcoming (in my view) of codeguru, which was its big emphasis on MFC. ATL and STL should be covered as well. And the first looks are promising! Regards, Gertjan Schuurmans Amsterdam The Netherlands