Jump to content

kwilliams

Members
  • Content Count

    229
  • Joined

  • Last visited

Community Reputation

2 Neutral

About kwilliams

  • Rank
    Member

Profile Information

  • Gender
    Male
  1. I created a simple Stored Procedure (SP) that queries a table and renames the column names, and I'm able to push those results out to a CSV file *with* those header names when done manually.But when I try to export the results to a CSV file by running the same SP using xp_cmdshell with bcp, the header row (Col1, Col2, and Col3) does not appear in the resulting CSV file.ORIGINAL TABLE:ColumnName1-----ColumnName2-----ColumnName3Joe Schmo CustomerJane Doe CustomerTim Tiny MusicianQUERY WITHIN SP:SELECT ColumnName1 AS Col1, ColumnName2 AS Col2, ColumnName3 AS
  2. I recently got a new machine that runs Windows 7 Professional with 64-bit OS. I re-installed several programs, and tried to install SQL Server 2000 without success. I was told that it wasn't compatible with Windows 7, but that I could download MS's "SQL Server 2000 DTS Designer Components" to manage old DTS packages.This worked great a first for several weeks, and then blamo, it just stopped working for no reason. I can view all of the DTS packages with SQL Server 2005 under SERVERNAME > Management > Legacy > Data Transformation Services, but as soon as I try to open one, I get this e
  3. I thought that posting my solution might help others, so here it goes:After getting some advice from another forum user, I was able to solve the problem by taking a step back. I did that by using a simple example of the ArrayList at W3Schools at http://www.w3schools.com/aspnet/aspnet_arraylist.asp to compare it to my code. The issue ended up being in the page declaration. I had EnableViewState="false", and I changed it to EnableViewState="true". Once I did that, and I placed the initial code within an "If Not Page.IsPostBack Then...", it worked as it should.
  4. I'm having a problem getting the selected value from a DropDownList that uses an ArrayList as a DataSource. When I select a year and click on the submit button, I get the following error message: Object reference not set to an instance of an object. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. I'm not understanding why this isn't working. The years (1900 - 1993) are getting populated into the DropDownList without a problem, but on the btnSubmit_Click job gets submitted, I get that error. And and all help would be appreciated. Hopeful
  5. No replies yet? Too bad. I did find this article on 4guysfromrolla with using a DataGrid for the same thing: http://www.4guysfromrolla.com/articles/112603-1.aspx, but I don't like the limitations that the DataGrid gives me. If W3Schools doesn't intend on updating that page with another newer language, that's fine. I'd just like to know. It's been there for awhile now.
  6. I've always loved this simple code setup that allows you to edit an XML document with XSLT and ASP code: http://www.w3schools.com/xsl/xsl_editxml.asp But I've always wondered whether or not they'll add to that page with matching ASP.NET/VB.NET code. Is that something that W3Schools looks to do in the near future?
  7. To make it easier for users to get to a section of our site, we created a virtual directory alias which redirects the user to a specific web page. If there's no virtual directory for http://www.mysite.com/subdirectory/webpage.aspx, then that Master Page reference works fine. But once I created a virtual directory and attempted to get to that same page by typing the path to the virtual directory (http://www.mysite.com/subdirectory), I received this error message relating to the web page trying to access our site's Master Page, which is located in the root of the site:Server Error in '/subdirect
  8. I have AutoPostBack set to "true" for a few dropdownlists on my form. Every time that I set this property to true, the page takes 4-5 seconds to load that dropdownlist, no matter what code is located within the Page_Load event.Even if I create a completely fresh page with absolutely no codebehind, it still takes that long to reload the page. This becomes a problem with any applications, because if a user selects 3 options quickly from 3 different dropdownlists, the second two get erased because it took so long for the first one to load. That ends up being a pain.Is this normal? Why do they tak
  9. Here's the solution:Dim n As IntegerFor n = 0 To 10 Dim listItem As New ListItem listItem.Text = n DropDownList1.Items.Add(listItem)NextThanks anyway:)
  10. I need to populate a dropdownlist with a set of numbers that are looped (0 - 10). The code I have below works as a static option:Dim numbers() As String = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}...but I'd like to have a loop working something like thisDim n As Integer = 0For n = 0 To 10Response.Write(n)Next nDoes anyone know how to do this? Thanks.
  11. Thanks justsomeguy,I received a similar response somewhere else with this example:...objConn = Server.CreateObject("ADODB.Connection")objConn.ConnectionTimeout = 10 On Error Resume Next objConn.Open (strConn)On Error GoTo 0If objConn.State <> 1 Then ... unable to connect to that db ... ... so you get to figure out how to handle that ... ... note that objConn is now useless, so don't attempt to use it ... Else ... should be okay End If...I've added that code without any problems, so we'll see if it works on the next error. Thanks.
  12. We have an application that pulls data from several servers, and one of the external servers that we don't have control of went down recently. When our code attempted to open the connection string to that server, it pulled our entire application down.So I need to know how to check that a connection is working first *before* attempting to open it, so that it won't bring everything else down with it. here is what the connection string looks like: Dim strConn As StringstrConn = "Provider=SQLOLEDB; Data Source=SERVERNAME; Initial Catalog=DATABASENAME; User ID=USERID; Password=PASSWORD" And here
  13. That's obviously a typo. Sorry about that, and thanks again for the help.
×
×
  • Create New...