Jakein2006's Q&A profile
.NET Development Excel and SQL Server
How do I read an excel spreadsheet in vb.net and insert the records from the spreadsheet into a SQL database You will need 2 connection objects one for sql and one for excel.... Imports System.Data.SqlClient Dim oSQLConn As SqlConnection = New SqlConnection() oSQLConn.ConnectionString="my connectionstring" oSQLConn.Open() "Server=Aron1;Database=pubs;User ID=sa;Password=asdasd;Trusted_Connection=False" "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"" " "HDR=Yes;" indicates that the first row contains columnnames, not data "IMEX=1;" tells the driver to always read "intermixed" data columns as text TIP! SQL syntax: "SELECT * FROM [sheet1$]" - i.e. worksheet name fo ...Show All
SQL Server Using expressions with FlatFile connections?
This seems so obvious, but is causing me a lot of trouble: The flat files input to my SSIS packages may contain an empty line between each row of data, or may be "continuous" without any extra empty lines. Here are small examples of the data I'm working with: With the extra line: "M","SFH","Single Family Mortgage Loans","Single Fam Mtg" "M","MFH","Multifamily Mortgage Loans","Multi-Fam Mtg" "R","MIX","Mixed/Various/Unknown","Mixed/Various" Without the extra line: "M","SFH","Single Family Mortgage Loans","Single Fam Mtg" "M","MFH","Mult ...Show All
Windows Forms StatusStrip ToolTip Position
Hi there, It looks like the ToolTip default posion for status Strip is below text/ mouse click point. Since my status strip is at the bottom of the screen, it wouldn't work for me. Is there a way that I can set the tooltip position to above text/ mouse click point I came across a Show() property for tooltip, but tooltip isn't inheritance by statusStrip. I am not sure how can I call the show() property from statusStrip. Is show() property even the right one for me to use Since status bar is usually at the bottom of the display, is there a build-in property already for convinence (I am using C#) Thank you, Bonnie Hi Michael, How does windows determines that tooltip is off the screen or n ...Show All
Visual C# Why does COM interop behave different in VS2005?
I have created may libraries using C# VS2003 and then used COM interop to register the type library (regasm mydll.dll /tbl mydll.tlb /codebase) and have created excel add-ins as a wrapper to the original .NET library. Everything worked great. I have since upgraded to VS2005 and the same projects that had no problem in the past now do not work. To make it even more complicated, they all work on my machine, but not on another machine (i even tried it on a machine with VS2005 loaded). Here is the code for a simple .NET library in VS2005. I then take the dll and move it to a machine with the same .NET framework, register is (as above using regasm) and try to call it using excel. No luck. Excel error says "File or assembly ...Show All
Internet Explorer Development Still another report on this...
Having an intermittent problem printing To: From: CC: Subject: Attachments: headers on emails. Usually happens with larger emails or emails with large attachments or emails that have been replied to or forwarded from other people. Have installed Generic/text printer and sent the email to this printer but sometimes the headers are still missing even printing this way. I have if I open the offending email and highlight just one or two words in the text of the email eg Dear John and then print the email using my HP printer (not as text on Generic printer) - the headers then print and so does the selected words. Don't suggest using Outlook as often we only print the first page of emails as we already have the rest of the email on file especial ...Show All
.NET Development How to load assembly from config file
Hi, we have to define COM/.Net references in come configurable file in Windows Forms application (class library). For .Net Web application we can add something like this in web.config file to define a referance: <configuration> <system.web> <compilation> <assemblies> <add assembly="System.Data, Version=1.0.2411.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> </assemblies> </compilation> </system.web> </configuration> But for windows this element is missing. Is there any way thru which we can load assemblies from any configuration file or any updatable file. Regards Sid Hello, You may load assembly in diffrent Ap ...Show All
Software Development for Windows Vista creating a new desktop on Vista...
Hi, All I run into a strange issue about desktop on Vista. I created an app running in 1st desktop, that launches an app in the 2nd desktop. The app in the second desktop launches 3 more apps (notepad, paint & calculater). When I switch to the second desktop, the Aero feature of Vista is missing in the second Desktop. I wanted to know why is it so, is it a limitation on part of Vista or is it by design or am I missing something... Thanks in advance! Manoj ...Show All
SQL Server solution/projects/package organisation
I would like to create a set of packages which could be used as a basic package for other people. This package /project/solution should be used in a way that another a person could manipulate it in BIDS nad save it as a stand-alone package. I already created some child packages and one package which should act as a "template" for developing a new package. The devloper should integrate existing child packages very easily. All developers will share the same network directoy where all the solutions/projects/packages will be stored (which is not a problem to realize it) But how can it be organized that you can have a basic package which can be used as a general "template" Does anybody have a good idea, how this ...Show All
Software Development for Windows Vista EventHandlingScope eventhandler performance
Hi, I've been doing some performance testing and want to check my conclusions for the results of one of my scenarios. Previous scenarios exercised variations of a test where each iteration invoked a workflow which ran to completion. SequenceActivity BeginActivity EndActivity Parameters are passed in and out of the workflow and between activities via dependency properties. In a failed attempt to improve both throughput and response time, I created an event-driven workflow that is only created and started once. Iterations are initiated by calling an iterate method on a local service. The local service queues an item for consumption by a custom activity. The basic idea was to avoid per iteration lifecycle costs. Here's t ...Show All
Visual Basic What's the difference
Ok folks, so I've got a program that runs code that has a FOTRAN dll that (thank god) I finally have working, for the most part. At least it does when I pass it the path/name of a file that I've created using notepad. Buuuut, that's not gonna cut it when it comes down to it. What I've done is created a GUI that creates an input file for FORTRAN and all it does is write a line of text for each input in FORTRAN. But when this VB written file,written using streamwriter or FileSystem.AppendText (I wondered if there might be a problem with the streamwriter making hidden characters but no), is passed to my FORTRAN dll and the methods native to the FORTRAN code attempt to consume the data, I run into an interesting problem ...Show All
Visual Studio Tools for Office Excel 2007 setting Border.LineStyle
This code works for pre-Excel 2007 and not Excel 2007: (1) style.Borders[Excel.XlBordersIndex.xlEdgeRight].LineStyle = Excel.XlLineStyle.xlContinuous; if I change it to the following (casting the constant instead of using the XlBordersIndex value)it will work in 2007: (2) style.Borders [(Excel.XlBordersIndex)Excel.Constants.xlRight ].LineStyle = Excel.XlLineStyle.xlContinuous; Anyone know why (1) will work in previous Excel versionsand not in 2007 Why changing to (2) works in 2007 BTW, (1) can be used to correctly change xlEdgeLeft on any Excel version. It is only xlEdgeRight, xlEdgeBottom, and xlEdgeTop that will not work in Excel 2007. TIA Hi, OK - You should post in the fo ...Show All
SQL Server notification service
hi all, I need help from some one expert or have an idea about How i can send notification emails to my customers that i added in SQL 2005 table using notification service. notice: - my customers informations exists in table in my SQL DataBase. thanks alot You may want to start by going through the walk-through sample application that comes with Notification Services. It provides a pretty good introduction to the product and how it can be used. HTH... Joe ...Show All
Visual Basic I've run this before without a problem, but now I'm getting a warning!
Okay, I've run this before without a problem, but now I'm getting a warning stating "InvalidArgument=Value of '1' is not valid for 'index'. Parameter name: index" . Why would it begin giving me this error now after running it in debug several times without a problem before Anyone, please help. I forgot to include the code, here it is. The line in yellow is what keeps poping up the warning during debugging. Private Sub DeleteButton_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeleteButton.Click 'Check which item has been selected' Dim Count As Integer = Me .ListView1.Items.Count Dim AddFromZero As Integer = 0 While AddFromZero <= Count ...Show All
Visual C++ How to disable use of short-file names?
I want to turn off use of short-names of files by editing registry. how can i do i can do turn-off for genaration of short file names : http://www.chami.com/tips/windows/123196W.html But want to disable short-file names those are already present on the system. Any help is appreciated. Hello Sorry, wrong link in my previous post, see http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=789657&SiteID=1 for this forums focus. Thanks Damien ...Show All
Visual Studio Team System WSS (Windows sharepoint service) with SP2
1. How can we make sure that we have WSS (Windows sharepoint service) installed correctly or configured correctly 2. Which port WSS generally use 3. When I tried to create web-site (vs 2005 .net), using HTTP system, it gives me following error. Error: "Unable to create the web 'http://localhost/chintan/TrialWebPages2'. Visual Web Developer does not support creating Web sites on a SharePoint Web server." Ur help is needed to understand what's going on and how can i resolve this problem. hi john, I don't have sharepoint portal server installed. It was installed but when I install TFS, it requests to delete that so i did. To delete Sharepoint Portal Server is Prerequisite for installing TFS. 1 ...Show All
