sroughley's Q&A profile
Visual Basic shift cells down on excel insert row.
I'm using this code to print and invoice to an excel template Dim XL As Excel.Application Dim xlwb As Excel.Workbook Dim xlsheet As Excel.Worksheet XL = New Excel.Application xlwb = XL.Workbooks.Open( "C:\Documents and Settings\S. Ross\My Documents\sales invoice1.xls" ) xlsheet = xlwb.Worksheets(1) XL.Visible = False Try xlsheet.Cells(8, 2).select() XL.Selection.value = Me .NameComboBox.Text.ToString xlsheet.Cells(9, 2).select() XL.Selection.value = Me .AddressTextBox.Text.ToString xlsheet.Cells(10, 2).select() XL.Selection.value = ( Me .CityTextBox.Text.ToString) xlsheet.Cells(10, 3).select() XL.Selection.value = ( Me .StateTextBox.Text.ToString) ...Show All
SQL Server Event Handler on error fires continually in a loop
I have a data flow task inside a loop and an event handler which fires if the data flow task fails. The loop goes through a list of servers and if the data flow task cannot connect it fails. My problem is that the event handler continues to fire for every time the loop runs after the first error - even if all subsequent tasks are succesfull. It seems that the OLE DB source in my dataflow task stays in an errored state for every server it connects to after an error has been fired (even if every connection after that succeeds). ...Show All
Visual Basic Object reference not set to an instance of an object.
Below is the code snip. Previously it was running fine but don't know what's the problem now. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: Line 401: Dim strImagefile As String Line 402: Line 403: If (txtfUpLoadfile.PostedFile.ContentLength > 0) And (Not txtfUpLoadfile.PostedFile Is Nothing) Then Line 404: strImagefile = SaveImageFile() 'Function to upload the image Line 405: strEmpImage = strImagefile Source File: Edi ...Show All
SQL Server Migrating A SQL 7 DB to SQL 2005
We are planning on upgrading a SQL 7 Server to 2005 SP1. I ran the Update Advisor and one of the issues listed was that the Database Maintenance Plan would not work in Server 2005. The Advisor mentions a tool to use but not which one, which is my first question. I went online and found some documentation regarding copying the database etc., however, when attempting to copy from the SQL 2000 (DB in SQL 7) to 2005 (I have SQL 2000 and 2005 on my machine) when I try and connect to the 2005 box, its listed as one of the instances but will not connect. For grins and kicks I backed the database up in the 2000 environment and restored it on a test machine which is in 2005. The Advisor was correct, I am unable to create a Database Maintenanc ...Show All
Visual Studio Team System Socket Error 11001
For the past 2 days, I have been losing internet connections with the following error "socket error 11001" - I am connected to a cable modem, and have had it checked and everything is Ok - when I get the error, I run a system registry error repair and it goes away. Why am I getting this error, and how can a permantly fix it Thank you I think you need to post your question in the Vista newsgroup - these forum are for programming-related questions, and this forum in particular is for Visual Studio Team Foundation Server. You should probably start here: http://windowshelp.microsoft.com/communities/newsgroups/en-us/default.mspx ...Show All
Visual J# help im a first time user
i feel really stupid in asking but im getting real frustrated... how do i compile my code do i need a seprate program or is it in the options can you tell me how goto microsoft web site and download the express version of Visual J#.NET 2005 and start developing with J#. Enjoy it!!! ...Show All
Software Development for Windows Vista Test Case 15, and automatically launched app
In the notes paragraph we have: "Per machine installs have no correct user AppData directory because elevation may be needed; user data must be written at first run and not during install in order to pass this test case." My application is automatically started at the end of the installation (custom action). Therefore it will be impossible for the tester to check this. If your setup is launching the application on first run elevated and having the user set up the app and writing config data to HKCU and AppData, that's a problem, because it's basically the same thing as if your elevated setup were doing the write to the wrong AppData. As far as how a tester might check to see if things w ...Show All
.NET Development SourceTable and SourceField
Hi I'm upgrading my code based on DAO to ADO.NET in VB2005 and got stuck looking for SourceTable and SourceField properties of DataTable fields. DAO.Recordset.Fields have .SourceTable and .SourceField properties which tell you the original table/field which provides the data in that particular field of the recordset. This is useful in my application where I am filtering users' queries to the database to see whether I want to allow them access to that particular bit of data. Although I can imagine that there are maybe other solutions to security issues, I've already built a whole system around this method, and would like for simplicity's sake just upgrade it without changing the methodology. Can anyone advise where to g ...Show All
Visual Studio SP1
New to the forums, haven't done a lot of reading yet. Will be soon, as I *just* installed vs2005. Honestly I ONLY needed VC++ by MS. But I'm sure there are a few of us that only needed one of the apps. Anyhow, question, any ideas on when SP1 will go final - np it's currently released in Beta but should be officially out in Q4 2006 - almost there. Probably November-ish sometime but don't quote me (would be cool if it were on my birthday in November!) ...Show All
.NET Development Difficulties accessing DB2 through OLE DB from VB.NET
What is needed on the developer and application server ends for .NET applications to talk with DB2 through OLE DB When the project started, we didn't have a spare DB2 server, so I installed a trial version of v9.1 on my computer and used that. However, I am encountering difficulties in deploying the application to production as it must access the database server remotely. I believe one issue revolves around the fact that when I had DB2 installed on my local machine, it provided the OLE DB drivers the application needed. Should the application server have DB2 Connect installed Doesn't OLE DB support come with IIS 6 Any help would be greatly appreciated. My personal background has been PHP development with MySQL, so these kinds of issues n ...Show All
SQL Server Why SELECT AVG(column) From Table is not working in Jet database?
Hello, XPSP2 VB 2005 Express Jet/Access database One of the Forms of these application display a Jet database table. Why querries Min, Max, Avg do not work Thanks, Should work, I just ran this code against NorthWind Access database and it works fine: Private Sub Button2_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim conn As System.Data.OleDb.OleDbConnection Dim cmd As System.Data.OleDb.OleDbCommand Dim dr As System.Data.OleDb.OleDbDataReader conn = New System.Data.OleDb.OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\nw99.mdb;" ) conn.Open() cmd = conn.CreateCommand() cmd.CommandType = Command ...Show All
Visual C++ porting code from win32 console to MFC
I was given some code developed in a Visual C++ Win32 Console Project. I was asked to port the code to a thread inside a MFC application (single document, standard MFC in a static library). I'm getting a lot of new compile errors I did not see in the Win32 Console environment (see below for a partial list of things that no longer compile). Are there a few simple things I can do to make it compile, or am I looking at a brutal undertaking string (data type) ostringstream (data type) setw (function) setfill (function) I have a also have got a problem with porting code from a win32 console app to MFC. This is the code: #include <conio.h> #include <stdio.h> int main( void ) { int state = 0; /* ...Show All
Visual Studio Express Editions Listbox drag drop & reorder
Hi, I have 2 listboxes on my form. List1 is filled with alphasorted items from my access database. I need List2 to be filled with items dragged & dropped from List1 Users should be able to reorder List2 using dragdrop. I know this used to be a limitation in VB6. Can someone please point me to a .net/vb2005e solution for this I'm sure it will benefit others as well. Thanks ! No, I need the items on Listbox2 to be manually sorted within Listbox2 . Item3 can be dragdropped and can become Item1, etc within Listbox2 . take a look at this : http://atlas.asp.net/atlastoolkit/Re...orderList.aspx This is what I am trying to achieve in vb2005e ...Show All
SharePoint Products and Technologies stsadm.exe
Hai, i got an error using the stsadm.exe cmd line tool.When i try to create a site or website iam getting an error. The specified domain either does not exist or could not be contacted. (Exception from HRESULT: 0x8007054B) i got messed with this error message.All n/w connections are working fine.i can able to communicate with AD. Anyone out there help me out hai actually i rectified that domain not created issue by changing my LAN setting..... Now im facindg new issue....i can create site,web.URL in stsadm.exe(as im using ad account creation mode)....but i cant browse those3 pages .....i can create sharepoint site only in central admin page.... the error im getting ...Show All
Visual Studio 2008 (Pre-release) RichTextBox save to string
Hi, I want to save the content of the a RichTextBox to a string, in the DataFormats .Rtf. This is an example a saw, but it doesn't help me to save in a string. TextRange sourceDocument = new TextRange (richTextBox.Document.ContentStart, richTextBox.Document.ContentEnd); MemoryStream stream = new MemoryStream (); sourceDocument.Save(stream, DataFormats .Rtf); cmnjgfj C C call stream.Seek (0, SeekOrigin.Begin) after you call sourceDocument.Save(). TextRange sourceDocument = new TextRange(richTextBox.Document.ContentStart, richTextBox.Document.ContentEnd); using (MemoryStream stream = new MemoryStream()) { sourceDocument.Save ...Show All
