Benjamin Coats's Q&A profile
SQL Server What is INSERT BULK?
Morning, I've just been running a Profiler trace on an ETL operation that I was doing and the SQL statement issued was: "INSERT BULK table <column-list> " That was it. Profiler didn't record what values are actually getting inserted. I looked in BOL but there's no mention of this syntax in either BULK INSERT ( http://msdn2.microsoft.com/en-us/library/ms188365.aspx ) or INSERT syntax ( http://msdn2.microsoft.com/en-us/library/ms174335.aspx ) I'm assuming its just a different syntax for BULK INSERT, although it doesn't specify a source file which is strange. Also, like I said the profiler trace only contained a column list, it didn't contain the VALUES part of an INSERT statem ...Show All
Visual Studio Express Editions Reading 2 lines from a file
Hi all! It's me (again). I feel really frustrated, because I know that I'm so near to achieving my goal, and yet it seems so far! Problem: I have a text file with 2 lines (it will always be the same): - Line 1 defines the name of the "Plugin" - Line 2 defines the executable path of the "Plugin" A directory (sampledir1) contains an amount of files structured like this. Is there a way to add the names of these "Plugins" to a listbox, but also assign a value to that item, so that when the item is selected, the plugin will launch. Please don't get mad at me for asking so many questions - I'm still a newbie... Thanks! Johannes Hi Spotty Thanks - that helped me a lot, but now, I also want to put in a cas ...Show All
Visual Basic How can I find and modify the correct control on my form?
Hello, say, if you have several of labels (Label1, Label2, ..., Labeln) on your form, and also a textbox and a button. If you put, for instance, "label5" in the textbox and click the button, how is it then possible to find Label5 and, say, change its back color Hope it does not sound too cryptic... Any suggestions :-) Goody-goody, problem solved :-) Thanks DMan1!! Anthony D. Green, I tried your solution, but I couldn't make it work - VB gave me error on '(Of T as Control)' and also on 'controlT = TryCast(child, T)', i.e. the TryCast-statement. I tried to sort it out by modifying and searhing help, but with no luck... Anyhow, thanks to you both :-) ...Show All
SQL Server Count & LastNonEmpty
Is there any way to make Count work properly on a measure group where aggregation for every single measure is set to LastNonEmpty Basically it's a fact table that contains periodic snapshots of data & so count only makes sense within the slice based on insertion time. Thanks! What kind of count do you want in this snapshot scenario - is it a count of all objects for which there is data - could you illustrate with some examples And are the snapshots synchronized, or could they be created at different times ...Show All
.NET Development XPathNavigator.MoveToFollowing
Hi, I am using MoveToFollowing method to get info about xml element which I want to modified or so. However after moving to one element I cannot move to the previous one! It is need to move to the root first. It is not a good solution. What should I do in order to have access to all elements no matter where they are thanks for help Ela I can use also condition if (navigator.MoveToFollowing || navigator.MoveToPrevious) { } It is not the best solution too but better than using MoveToRoot ...Show All
Visual C# Differences between i++ and ++i
Hi to all! Sorry for my ignorance but could anybody explain me what is the difference in a cycle when we increment a variable i in this way i++ and i++ e.g. for ( int i = 0; i < 10; ++i ) and for ( int i = 0; i < 10; i++) Thanks a lot in advance! i++ is using postincrement. It means that the number is incremented after it's use. For example: int i = 5; foo(i++); // 5 will be sent into foo as a parameter, and i will then increase to 6. Preincrement on the other hand increments the value before using it. For example: int i = 5; foo(++i); // 6 will be sent into foo as a parameter. Did that answer your question ...Show All
Visual Studio An Addition to the Tips? - Error 1406
A quick tip for people having problems installing Visual Studio (I'm not sure which versions this applies to, but Pro in particular...) If you are getting Error 1406, particularly if it mentions keys that began CLSID, make sure you do not have Zone Alarm Pro running, as it seems to prevent access to the CLSID key in the registry. Right-clicking and selected Shut Down Zone Alarm is sufficient (or was for me) and then the setup should install fine by clicking retry on the error message. I hope this helps someone, this was a problem that took me a few hours to workout . you should have also read this ;-): http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=778624&SiteID=1 its stated to disable ...Show All
SQL Server change chart color
Hello, Is it possible to specify color in more detail in the switch statement not "yellow" or "red" but I want to determine the colors by "RGB-values"... hope everyone understands my problem regards, Rhapsy hello, thank you for your answers. they are both helpful and that exactly what i'm loking for ... thanks, rhapsy ...Show All
SQL Server logical modeling vs physical modeling
Can someone please explain this statement: At the logical level where there can be any number of entities in a relationship while physically you define relationships between two tables. thx, Kat Take a n-m relation, an example would be a student entity and an lecture entitiy. A student can visit n lectures and a lectures can be visited by n students. Although the tables (entities) cannot be directly be related (only through the n-m table) the pure relation only exists between the students and the lectures entity. its the definition of an entity which make the difference between the understanding. HTH, Jens K. Suessmeyer. --- http://www.sqlserver2005.de --- ...Show All
SQL Server Death of ODBC
ODBC is not supported as a data source in SQL Analysis Services 2005. ODBC is not supported as a data source in SQL Reporting Services 2005 Model Designer. Any thoughts Joe With regard to Model builder - in SQL Server 2005 Reporting Services supports building models on top of Analysis Services and SQL Server 2005 and SQL Server 2000 data source. This is not to be read as a 'death of ODBC', rather it reflects the significant effort required to support a particular data source for semantic modeling purposes. Essentially what Reporting Services does under the covers is: 1) Evaluates the schema and content of the data source to determine what entities, attributes, and roles (r ...Show All
Windows Forms Is this possible in .NET?
Is it possible to make this kind of toolbar in .NET. If so how Matt Yup. You can make something exactly like that just using a Windows Form. Just drag a toolstrip onto it, size it how you want, and wa la! If you want cool looking graphics, then you will have to look into skinning a windows form. ...Show All
.NET Development DataAdaptor Update() method
Hello, I am facing a problem regard updating data back from a dataset to my data store using SqlDataAdapter. first i wished to perform updates from multiple tables at one call for Update() method but it did not work. Then i made a simple application to Update data of one table. Still i am getting same problem. ( No row is being Updated/Deleted/Inserted ). Here is the code. public void DoUpdate () { DataSet ds; SqlDataAdapter da; this .da = new SqlDataAdapter ( "Select companyName, address from companies; Select sms from Inventories" , @"MyConnectionString" ); this . da . UpdateCommand = new SqlCommand ( "Update Companies set companyName='New Compnay'; Update Inventories set SMS='New ...Show All
Visual C# Inserting a first/top line into a Combobox (Windows Forms App)
I'm using VS2005 and need to insert a line to appear as the first item in my combobox, but unlike VS2003 you don't seem to be able to use the ListItem object as it's not available in Windows Forms. Can someone please show me how to insert "Please Select" into my combobox Many thanks Sorted it - All it needed was: combobox1.text = "Pelase select"; right after the binding command cheers for coming back to me though ...Show All
Windows Forms Current Window Name
Hi, How do I get current windows name / application type which has focus Like if current focus is on notepad, it should return the file opened in notepad or string "notepad". Thanks! Search on the net for this: Private Declare Function RegisterShellHookWindow Lib "user32.dll" ( ByVal hWnd As IntPtr) As Boolean Private Declare Function DeregisterShellHookWindow Lib "user32.dll" ( ByVal hWnd As IntPtr) As Boolean What you do is register a subclassed NativeWindow and override WndProc... Use this in WndProc, and you will succesfully have a pointer to the activated window: Case Me .ShellHookMessages.HSHELL_WINDOWACTIVATED ...Show All
Visual Studio Tools for Office RemoveCustomization
Hi, I want to Remove the customization of the document when the document is closed. I tryied to do this in the Shutdown event calling the RemoveCustomization method but i got an error that the file is opened. How can I remove the customization when the document is closed Regards, Juan Hi Juan, I tested this for you, and I was able to do it using the BeforeClose event: public partial class ThisDocument { private void ThisDocument_Startup(object sender, System.EventArgs e) { UserControl uc = new UserControl(); Button bt = new Button(); bt.Text = "Click Me"; uc.Controls.Add(bt); ActionsPane.Controls.Add(uc); } private void ThisDocume ...Show All
