Thomas Maine's Q&A profile
SQL Server Giving a user permissions on objects in a schema
Hi, SQL Server Security is not my strong point so forgive me for asking stupid questions. I have a bunch of tables and sprocs within a schema 'MySchema'. I have a user 'MyUser' defined in the database. I would like to give MyUser permission to SELECT from tables and EXECUTE all sprocs in MySchema. What is the simplest way of doing that Will the following: GRANT EXECUTE ON SCHEMA :: [MySchema] TO [MyUser] WITH GRANT OPTION AS [db_owner] GRANT SELECT ON SCHEMA :: [MySchema] TO [MyUser] WITH GRANT OPTION accomplish that (I can't test it out at the moment because our DBA isn't around and I don't have permission) With best practices in mind - is what I am doing here considere ...Show All
Visual Studio Express Editions I want to add progress bar
I want to add progress bar in form which display how much program is proceeded I have to functions like A(), B() my coding looks like this A() 'statement 'statement 'statement while B() end while 'statement 'statement end sub so i want to know where i put progress bar function which follow completion of fucntion A() please guide me how can i written code for progress bar Try setting the ProgressBar's Style property to Marquee. Call its Refresh() method inside the loop. ...Show All
.NET Development C# Regular Expressions
Hi, I have some code that reads a line from a text file and, using regular expression only returns words that are in caps: string sExpression = @"(\b[^\Wa-z0-9_]+\b)"; MatchCollection mc = Regex.Matches(sr.ReadLine(), sExpression); I'm not very good with regular expression and I wan't to know if there is a way I can not only get back all words that are in caps but also all occurences of the word Space. I.e. my line that has been read from the file would be something like: LButton O N L Y Space T I M E Space W I L L Space T E L L ShiftKey LShiftKey D1 LButton LButton LButton And I want to get back, by hopefulyl eventually replacing the word Space with " ": ONLY TIME WILL TELL Hope ...Show All
Visual Studio Express Editions Join function with array of Objects
Help lists the declaration of the Join Function as Function Join( ByVal SourceArray () As { Object | String }, Optional ByVal Delimiter As String = " " ) As String It does not describe what happens if SourceArray is an array of objects rather than strings, but I assumed that it would use ToString to convert each Object to a String and then join them using Delimiter. However when I try to use Join to convert an array of IpAddress Objects to a string like this: Dim dnsAddresses() as IpAddress dnsAddresses = Dns.GetHostEntry("AComputerName").AddressList Dim Adrs As String = Join(dnsAddresses, ", ") the Join function gets an "Argument 'SourceArray' cannot be converted to type 'String'& ...Show All
.NET Development reflector tool in .Net
hi, when i try to open a system dll "sfc.dll" in the reflector tool, then it does not get opened in the reflector. it shows an error "sfc.dll does not contain a CLI header" can anybody tell the cause for this and resolve the issue regards, divya thanks for the reply jon, yes, u r right... i am talking of the system32 sfc.dll. i want to know what this DLL actually contains what the sfc means plz help me in sorting this problem... regards, divya ...Show All
Visual FoxPro Problem with Browser activex control
I have a vfp form with a browser activex control (which I've named ole1). I use the browser to display an html page which uses javascript to create a text editor object like this: var oFCKeditor = new FCKeditor( 'FCKeditor1' ) And then (again in javascript) I can set up the text to be edited like this: oFCKeditor.Value = "Some html <b>text</b> here" Is there a way of accessing the oFCKeditor object from foxpro after the page has been displayed I've tried something like Thisform.ole1.document.oFCKeditor.value but that doesn't work. Malcolm Thisform.ole1. OBJECT .Document.oFCKeditor.Value check this example Loading HTML into a WEB Browser Control from Vari ...Show All
Windows Forms How To => Open Form / Set Up A Skin ?
How To Open The Form And Set A Skin For Window Thank You For Best Answer . Another thing that would help is what he means by "skin". He can either be referring to a custom made form (removing the forms border, setting a background image, and coding to close, minimiz, maximize, and move the form). Or by meaning selecting a Windows XP visual style. ...Show All
SQL Server A counting question
I'm hoping that someone has the answer. I guess I may be missing the obvious but I'm struggling to do this. Simplified, I have two tables:- One table contains a list of Customers and the other table a list of Products that they have purchased. They are linked by a customer reference no, a one-to-many relationship. What I want to be able to do is count have how many Customers have purchased both Product A and Product B. Can anyone tell me the SQL statement that would return the answer as a single number. Thanks in expectation Ventus: I am going to assume that the customer records are unique by customer. I am going to use exists clause because it is likely that a customer has made multiple purchas ...Show All
SQL Server SQLServer Performance to Queries
Hi, During my working with SQL Server 2000 sometime back in a enterprise application development, we found some performance bottlenecks and tried to resolve the same by following some rules. 1.Having GUIDs as objectIds(primary key) was slowing the queries so we used int datatype instead. 2. Limit the joins in a query to 3 or 4 and denormalise the table if it needed more joins 3.Stop using Dynamic queries and use Stored procedures instead. Are they still valid in SqlServer 2005 too Should I follow the same rules here also Is there any improvement in these rules oj wrote: You can use newsequentialid() instead of newid() to generate a sequential guid. This will reduce page contention and ...Show All
Visual C# stdole.IPictureDisp to Bitmap/icon conversion in C#
I am having a 3rd part DLL which contains Icons. I have to use this DLL to get icons in C# application. That DLL returns the icon wrapped as an object of stdole.IPictureDisp. Now how to convert this to get the bitmap or icon. I am trying for image option but runtime exception comes as cant cast it. any Help. Hi, Ok, I see your problem now. I would use an Icon rather than an image as the 'handle' and try to convert that way. Have you tried this I would then start looking at all the fromHandle methods, and writing a wrapper in C++. Sorry but without more specific information I am going to struggle. The handle types for icons and images are very different and not interchangable. Rega ...Show All
.NET Development Classic Asp Include with Asp.net
Hello, I have a project that I am working on, that is written in Asp.net using master pages, and I am trying to include a classic asp page inside the asp:content. Is this even possible, if so, some help would be appreciated. Thanks One of these forums will probably be better able to answer this: http://forums.asp.net/29/ShowForum.aspx http://forums.iis.net/1032/ShowForum.aspx Thanks. ...Show All
SQL Server Cost of unicode?
I've converted most SQL Server databases to unicode since the AS 400 stores data in unicode (UTF-16). So far the only difference I see is that running queries to text in Unicode takes a lot longer, and UTF-16 files are 4x as large as Cp1252 files. Any way to get the file sizes / query times of old with Unicode Thanks for the suggestion... I've created a new thread here . ...Show All
.NET Development regex newbie question
despite reading many tutorials and such, spent 3 hours and no luck, i'm having a really hard time figuring out how to make this work.. the best i've been able to come up with is the following but it definately is no where close to working [^\"-_ !'.a-zA-Z0-9\040]+ I'm trying to figure out how to regex match the following: all alpha numeric characters, a-z A-Z 0-9 AND spaces are allowed AND the following chars are allowed: " - _ ! ' (double quote, dash, underscore, question, exclamation, single quote) i would very much appriciate a push in the right direction on this (Moderator: Thread Title changed from "regex newbie question" to "Basic Character Matching" for quicker thread understanding during a searc ...Show All
Visual Studio VS 2005 Unable to start debugging. COM+ registry db detected system error
System information: Windows XP Pro, VS 2003 & VS 2005, Framework 1.1 & 2.0. When I try to run an ASP.NET applicaiton in debug mode, I get the following error message. "Unable to start debugging on the web server. The COM+ registry database detected a system error." Anyone else have this problem and found a solution for it I had to call Tech Support for this issue. Tried all the stuff I found here and at other postings without success. Tech support went through all the normal stuff (checked security policies, uninstall .net framework (aspnet_iisreg -au), reinstall (aspnet_iisreg -i), restart IIS, etc without success. Then they had me add ASPNET to the local administrators acc ...Show All
Visual C# C# Date Time Help
Ok I am writing this program to log me into WoW at a sertain time set by the user, but right now it won't work. My question is how can I get it to continually check against the current time and then fire the process when they are equal right now the way it is I just get a Not responding error in Task manager with it. [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; /* NoWait V1.0.0 by TRTwiggy * * Date: October 22, 2006 * * Author: TRTwiggy AKA Tyler Reid * * Description: This program was written for two reasons. The first is to help * develop my coding skills. The second is that I got so damn tired of get ...Show All
