Allan-Nielsen's Q&A profile
.NET Development help: I need to view all the tables in a SQL Server Dataset
I'm using SQLConnection,SQLCommand, et. by code in C# (I'm doing so instead of just creating the connection and the TableAdapters graphically because I need to manipulate the SQL Command by code one the user selects certain criteria). What I need to know is, is there any way I can "read" the names of all the Tables in my SQL Server Database and list them in a ListBox With ADO.NET 2.0, you can call SqlConnection.GetSchema() method to retrieve schema info from your database DataTable tbl = cn.GetSchema("Tables"); Otherwise, you have to use "Select TABLE_NAME from INFORMATION_SCHEMA.TABLES" command in .Net 1.1. ...Show All
Windows Forms key-value for ContextMenu
Hi, I have problems with combobox because they take the focus and that send the event 'Leave' in my opened forms (within my MDI) and if I put a combobox into a toolbar, the behavior is wierd when I try to send BringToFront() a form (It still takes the focus). So, I figured that a ContextMenu would solve my problem because it doesn't take the focus but I never managed to make a bindingsource to work with it. I created a typed dataset that I bound to a BindingSource (DataSource = to the typed dataset and DataMember = the table in the DataSet). Then I go to DataBindings, I set the text property to be linked with the Value Column from the Binding source. When I assign a constructed DataSet to ...Show All
SQL Server sql server 2005 express edition VS visual basic 2005 express edition
Hello.. I've installed Visual Basic 2005 express edition & tried to connect to SQL Server 2005 express edition. I noticed that VB2005 Express Edition doesn't have any OLEDB provider for SQL Server. The only OLEDB Provider is for M.Access. Is this correct if so, what should i do if i want to connect SQL Server 2005 express edition with VB2005 express edition by using OLEDB connection type I really appreciate any respond from you guys.. Thank's and waiting for the good news.. Best regards, VITRELLE Use the SQL Native Client. Are you using the wizard or creating connection strings manually Check out http://www.connectionstrings.com/ carrier=sqlserver ...Show All
Windows Forms Translating DataGridView row index to a DataSet row index
I have a sorted DataGridView and I need to make a change to the DataSet that is bound to the DataGridView. Here's the code I'm using: void DataGrid_CellValueChanged(object sender, DataGridViewCellEventArgs e) { BindingManagerBase bindingManager = null; bindingManager = DataGrid.BindingContext[DataGrid.DataSource, DataGrid.DataMember]; DataRow findRow = ((DataRowView)bindingManager.Current).Row; int datasetIndex = DataSet.Tables["table1"].Rows.IndexOf(findRow); } From what I understand, the IndexOf() method should take the row and find the index of it in the dataset. My problem is it's always coming back as 0. Can anyone see a problem with my code. Thanks! I know this has to be a common problem...people bind data ...Show All
Visual Studio Express Editions Where can I get icons for my project?
I am making an app which needs some icons at the top. Can anyone tell me how / where I can get XP-style icons Thanks. Vampire GlyFx has some nice general icons that are free. If you want something more specific they also have several collections of icons you can purchase. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. GSE and Vista
So I heard on letskilldave (and the FAQ mentions it too) that there will be no Vista support for awhile, but I was really curious as to what the policy of GSE on Vista was. Is there some technical reason that it will not run, or is it something discouraged due to lack of testing e.g., will I be able to convince it to run by fooling/mangling the installer, or will it explode when I try to do anything with it Having just installed Vista 5536 on my best machine (the one sitting next to my 360 and the one with a new video card) and loving it, I don't think I could stand switching back to XP. I also need to do some ‘real’ dev under Vista, so that makes things difficult too ;( Thanks for any info anyone knowledgeable can ...Show All
Visual Studio Team System Work Item Tracking Customization - Potential Bug in TFS
I added some custom work item types and modified them using the GUI tool from Imaginets to export and import. When I found out I couldn't delete a work item or rename one, I ended up deleting my Team Project. I created a new one by the same name, but the menu for Work Items now displays an "Error loading menu: Index was outside the bounds of the array." I deleted that Team Project and created a new one by a different name, and it is working OK. Cade, From what you said looks like you deleted that project and we no longer have repro We have seen this when doing backend localization stuff, but that was workaround-able by closing/reopening VS, or in some cases doing "devenv /resetuserdata& ...Show All
Windows Forms ClickOnce deployment - Application identity is not set
I have developed a program using Visual Basic 2005 Express Edition. I have a Microsoft Access database included in the application, whose Build Action is set to "Content". To generate the connection string for the database, I use the following code: Public Shared ReadOnly Property ConnectionString() As String Get # If Debug = True Then Return "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ Application.StartupPath & "\AnniversaryReminder.mdb" # Else Return "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ My .Application.Deployment.DataDirectory & "\AnniversaryReminder.mdb" # End If End Get End Property When testing, I set my ...Show All
SQL Server do I need to pay for support cases to help MS fix bugs?
I've filed a few bugs on connect.microsoft.com, and I am being asked for 2nd time to open a support case to make it easier to work on the bug. The reason is that the bug needs to be reproduced, and working with a support person will help MS setup the same database, cube, etc. However, I am wondering why am I as a customer required to pay for the support incidents to help Microsoft fix software bugs In my view that type of practice might serve as a deterrent for bug filing and follow-ups. I am sure this is not the desired effect. No, you pay only if you support case wasn't MS error. If you file an issue that is a bug, you pay nothing. For the hotfix you pay nothing. But the way from bug support case ...Show All
SQL Server iif/switch statement does not work in input parameter expression
Hi There, One of the parameters that i need to pass to a stored procedure of my report, i wish to dynamically calculate from another input default parameter lets say parameter 'DrillDown' = "ABCDEFG" paramenter 'MyLevel' is calculated by either of the following a switch or iif statement: =switch (left(Parameters!DrillDown.Value,1)="A",1, left(Parameters!DrillDown.Value,1)="B",2, left(Parameters!DrillDown.Value,1)="C",3, left(Parameters!DrillDown.Value,1)="D",4, left(Parameters!DrillDown.Value,1)="E",5, left(Parameters!DrillDown.Value,1)="F",6, left(Parameters!DrillDown.Value,1)="G",7) --or-- =iif(left(Parameters!RepLvl.Value,1) = "A",1, iif(left(Param ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Custom Vertex
Does anybody know how to create a custom vertex I've tried using the existing formats as a guide, however I cannot get mine to act correctly. Basically I'm trying to extend PositionColor to include a PSIZE member for point sprites. Public Structure VertexPositionColorSize Public Shared ReadOnly VertexElements() As VertexElement Shared Sub New() Dim e1 As New VertexElement e1.Stream = 0 e1.Offset = 0 e1.VertexElementFormat = VertexElementFormat.Vector3 e1.VertexElementMethod = VertexElementMethod.Default e1.VertexElementUsage = VertexElementUsage.Position e1.UsageIndex = 0 Dim e2 As New VertexElement e2.Stream = 0 e2.Offset = 12 e2.VertexElementFormat = VertexElementFormat.Color e2.VertexE ...Show All
.NET Development Performance on MDbg Step and Break function
Each time I issue a break command on MDbg process, it takes about 120 to 300ms for the operation to complete on my machine. Why it takes that much time to break the debuggee What determine the time for the operation to complete Would it be the number of thread the process has, the context the debuggee is executing, or it is the implementation of MDbg break function Currently, I am trying to design an extension which give the user more control on thread level debugging. These threads do not share any resource so technically stepping though a thread shouldn't affect the other thread. This is done by stopping the debugee process, performs a debug operation, suspends the debugging thread and resume the non-debugging threads. I am h ...Show All
Windows Forms DataGridView Seek
Hi, Is some way that I can make a search in a datagridview not whit Loops (For, while). I remember that the datagrid in VB 6 has a Find or Seek method that does this. I don’t remember the correct syntax but it was something like this: DataGrid1.Seek = “field LIKE ‘” & textbox1.text & “%’” Datagridview has that method or is some way that i can do this In this case I'm not sure. I understand you want to highlight the rows perhaps - this can be done using the Rows[] property of the datagridview, and setting the "Selected" value to true to highlight that row. The query above as said will show you all the matches found in the criteria and will only show ...Show All
Visual Studio Express Editions starting a simple program
Yea, i just finished installing and setting up Microsoft Visual C++ Express Editon and Microsoft Platform SDK according to the instuctions on: http://msdn.microsoft.com/vstudio/express/visualc/download/ --just when i get to the last step of the instructions which is " Step 5: Generate and build a Win32 application to test your paths. ", I cant tell if the program is running or not. All the pops up is a blank dialog box that says "testrun" on the top left hand corner. When i create a simple .cpp file (this is the code) #include <iostream.h> int main(){ cout << "This is a test\n."; return 0; } and then run it (by pressing f5) i get the same blank dialog box with the same title on the top le ...Show All
Visual Studio Express Editions Numorous logins??
This Code===\/ Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click If UsernameTextBox.Text = "" Then MsgBox("Please Fill In The Username Box") End If If UsernameTextBox.Text = "MM" Then MsgBox("Correct", MsgBoxStyle.Information) My.Forms.Form1.Show() Me.Hide() End If If UsernameTextBox.Text = "VIOLATOR" Then MsgBox("Correct", MsgBoxStyle.Information) My.Forms.Form1.Show() Me.Hide() End If If UsernameTextBox.Text = "AXEL" Then MsgBox("Correct", MsgBoxStyle.Information) My.Forms.Form1.Show() Me.Hide() End If End Sub Doesnt ...Show All
