dhideal's Q&A profile
Visual Basic Anyone know how to pass records from DataGridView to Excel (Window Application)
Anyone know how to pass records from datagridview to excel. I've tried some codes but the whole chunk of records are writen in a single cell. Can anyone help Thanks alot. This is the code i writen. Dim icount As Integer = _2006_Pupil_ProfileDataGridView.Rows.Count Dim ccount As Integer = _2006_Pupil_ProfileDataGridView.Columns.Count() Dim s As String = "" Dim rowIndex As Integer Dim colIndex As Integer For Each r As DataGridViewRow In Me ._2006_Pupil_ProfileDataGridView.Rows For Each c As DataGridViewCell In r.Cells s = s & c.Value For rowIndex = 1 To icount For colIndex = 1 To ccount oSheet.Cells(rowIndex, colIndex) = s Next Ne ...Show All
SQL Server So frustrated...why does it have to be so difficult
Why have you made connecting to a sql server express database so difficult I have it working locally, but going to production has been nothing but a nightmare. I can't even connect locally on the production box. I am on a dedicated server and my login is an Admin on the box. I have just installed SQL Express + the fancy management interface. I have made a copy of my database that I was connecting to dynamically (which was failing remotely) and I have attached it to the server. I have made myself a user of the database and granted my self evey permission available. I have turned on impersonation in my web.config. The database knows it's me trying to connect and STILL denies me when I'm actually ON the production s ...Show All
Visual C# array.Resize()
private String [,] m_symbAndNames ; m_symbAndNames = new string [ 4 , 2 ]; So far so good. I can fill the array with values, etc. Then, Array.Resize ( ref ( string[,] ) m_symbAndNames, m_symbAndNames.Length + 2 ); I get an error message here: Error 1 The type arguments for method 'System.Array.Resize<T>(ref T[], int)' cannot be inferred from the usage. Try specifying the type arguments explicitly. D:\VCsharp_Projects\tapTCPports_1\Form1.cs 1162 13 tapTCPports_1 Why Thanks for any help. Well, yes. You can do what Array.Resize() does, i.e. create a new larger array, copy the values, destroy the old array. This is fairly easy: void ResizeArray (ref string [,] original, int cols, int ro ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How to import a 3d Model in XNA framework?
Can anyone explain me howto import a 3d model in an XNA project In which format I have to export my model from 3ds max 7 The SWM is fairly simple. Here's how its structured: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=685166&SiteID=1 ...Show All
Visual Studio Express Editions Establish array of unknown size
I am not too good working with arrays. I am trying to figure out how to dynamically add values to an array that will be of a size determined by how many times the user does something. Test code below. Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim inputnumbs() As Single Dim num As Single Dim input As String = "" Do ' unknown number of inputs will be given by user input = InputBox( "Enter value " ) If input <> "" Then Try num = input Catch ex As Exception MsgBox( "Numbers only!" ) Continue Do End Try End If ' At t ...Show All
Visual Studio 2008 (Pre-release) What is a sandbox?
Hi all: I want to connect my Xbap page with SQL database using SQL data Adapter and DataSet I try to do this but there is an error this error is: Startup URI: D:\walaa Work\XEmployee\XEmployee\bin\Debug\XEmployee.xbap Application Identity: file:///D:/walaa%20Work/XEmployee/XEmployee/bin/Debug/XEmployee.xbap#XEmployee.application , Version=1.0.0.0, Culture=neutral, PublicKeyToken=6b995c520c9daad7, processorArchitecture=msil/XEmployee.exe, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6b995c520c9daad7, processorArchitecture=msil, type=win32 System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e ...Show All
Windows Forms How to add new row from dataGridView
I bind dataGridView1 with bookBindingSource, now i wanted to add a new record from dataGridView to dataBase book table, how can i will do so. Thanks I think I'm having a similar issue. I have a DataGridView that is bound to a Strongly Typed Dataset. The dataset is a simple Single Table collection of records. I GetData() to fill the dataset, but when I try to Add a new row Dim thisDataGrid As DataGridView = RevisionEntities.PkgGrouper.Controls.Item( "PackagesDataGridView" ) Dim thisDataRow As Integer = thisDataGrid.Rows.Add() I get an error stating "System.InvalidOperationException: Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound" ...Show All
Visual FoxPro sending email from VFP through MS Outlook
We have the following code for sending email to Outlook. The email gets sent, but the font size is always 36 px or 36 pt (we tried both). None of the <cr><lf> show up. The email is one big paragraph. Can anyone help Here is the code: LOCAL loApp, loEmailItem, cHex lnsize = '"' + str(gaPointsize(Slcrm.nbodysize),2,0)+ '"' cHex = '' nDec = Slcrm.nColor nPower = 8 DO WHILE nPower > 0 cHex = cHex + hexdigit(INT(nDec/16^(nPower-1))) nDec = MOD(nDec,16^(nPower-1)) nPower = nPower - 1 ENDDO lcColor= '#' + RIGHT(cHex,6) * lcColor = '#' + strtran(Transform(GetColor(),'@0'),'0x ...Show All
SQL Server Scheduling the SSIS Package to run after every 2 mins
How can i plan the execution of a package For example, i want to execute the package every 2 minutes for all the time. I do not want to use SQL Server Agent to do this. I want the package to self contained to do it. Thanks Rohit I don't use SQL Agent either, but SSIS packages are not designed to be run like Windows services or Unix daemons. For one, there still is a memory leak in 64 bit (perhaps fixed in the forthcoming SP2) that forced me to write a script to restart the SSIS service whenever the msdtssrvr.exe's process working set size became too large. As for scheduling ,there are probably thousands of ways to do that. One that comes immediately to mind is schtasks.exe, which is a replacement ...Show All
.NET Development XML as Typed DataSet
I have a single XML file with the schema preceding the data. I would really like to use it in a typed DataSet. The only options I see in the data menu are database, web service and object. If I drag a DataSet item onto a form under typed I see "no datasets in project". How is it possible for me to pursuade the IDE to accept my XML file into a typed DataSet Thanks Grey Pony ...Show All
Visual C# Constructor???
If i have a bool variable called "bool IsNew = false" and i have a class called customers....If i have a constructor like public Customers() { IsNew = True; } Is adding this in my constructor say that every time this class is loaded...IsNew is true Assuming that is the only constructor, then Yes, IsNew will always be initially set to true. OF course, you can design more that one constructor, and if you were to define one like : public Customer(String name) { this.Name = name; } without resetting IsNew, then IsNew will retain it's first value of false. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Destructible terrain 2D
Greetings, For lerning XNA i figured why not make a Space Invaders clone in 2D. But something escaped me, being the novice i am. How do i make the shields destroyable, as far i can se it makes no sense to make each shield one sprite. So my question is how do i build these do i build them from 1000 spirtes the size of one pixel. or do i make one sprite and overlay the destruction in some way. I dont know how to do this, anyone care to share ideas br Lasse Knudsen Thanks for the replies. making lets say 6 sprites with varying levels of destrution wont really stay true to the origial game, for instance the shooting and creating a tunnel through your own sh ...Show All
.NET Development TableAdapter.Fill thread cleanup
I have a VB.Net application that calls the tableadapter.fill method each time a new entry is made in an edit box. The contents of the edit box is used in a query that filters by: "where number like 'xxx%' '' ('xxx%' is passed to the fill instance as a parameter). Each time a query takes place, a new fill is called, and 5 new threads are attached to the process, but never released. tableadapter.clearbeforefill is set to true. How should the old threads from a previous fill get released No. Do not explicitly create any threads anywhere in the app. Simple user interface with comboboxes (suggest style), tab control, edit boxes, bindingnavigator, etc. Nothing exotic. The threads in question appear during the ca ...Show All
SQL Server SQL 2005 User database Properties - No row at position 0
Hi, I seem to be having an issue with our SQL 2005 x64. When I go to the properties of the any database on a server I get: TITLE: Microsoft SQL Server Management Studio ------------------------------ Cannot show requested dialog. ------------------------------ ADDITIONAL INFORMATION: Cannot show requested dialog. (SqlMgmt) ------------------------------ There is no row at position 0. (System.Data) And when I try to shrink the database I get: TITLE: Microsoft SQL Server Management Studio ------------------------------ Cannot show requested dialog. ------------------------------ ADDITIONAL INFORMATION: Cannot show requested dialog. (SqlMgmt) ------------------------------ There ...Show All
Smart Device Development Why my CF1.0 SP2 apps wont run on CF2.0 SP1 device?
Hello to all, Our device manufacturer just upgraded their device to CF2.0 SP1 and now none of my apps will run. There are no errors generated when you try to execute these programs. When you execute the apps, they simply dont start. The apps were developed with VS2003 using CF1.0 SP2 and ran fine on the device before they changed to CF2.0 SP1. Should'nt CF2 supports apps targeted for CF1 Does anyone have any ideas Thanks -Chris You mean you did not installed V1 SP3 and both V1 and V2 are in ROM AFAIK you can't do that, V2 and V1 should be mutually exclusive in Platform Builder. ...Show All
