Search results

  1. N

    Problems with values when importing XLS into SQL

    I have an xls file that needs to be imported into SQL Server directly from .net. I figured out how to do this, but now my problem is the data. The following data is in the xls file: Name, Address, City, State, Zip, Phone The phone number can come in in various values(with dashes and without). I...
  2. N

    Keeping Data in grid while displaying error message

    I have 5 textboxes embedded in a datagrid that require a date format (mm/dd/yy), but can be left empty if user doesn't have date. User can poplutes these textboxes for multiple records and hit submit button. On the submit i loop through the grid. If dates are populated AND they are in the...
  3. N

    Disabling the EditCommandColumn of datagrid

    I am using a datagrid with the "EditCommandColumn". This creates an "EDIT" link as one of the columns of the grid. My question is...Can I disable the link based on another column of the grid? Ex: I have 2 records in the grid. 1st record has state of NY. 2nd record has state of NJ. If the...
  4. N

    Using a databound dropdown within datagrid

    I have a dropdownlist box within a datagrid that is populated with values that come from a database. What I need is.... When a user selects a different value in the dropdown , on the autopostback I need to update the database with that value and then re-display the datagrid with the dropdown...
  5. N

    Login Page

    I have a login page. I would like to add some more functionality and security to it. I have a table that contains users with their usernames and passwords. Every couple of months I would like to force them to change their passwords. Is there any sample code out there that does this? Thanks, Ninel
  6. N

    Error: Redirect URI cannot contain newline characters

    I have a web page in which a user enters values into a comment field. I have another page where based on the selection of drop downs the user gets redirected to another page where they can view these comments. If the user hits the enter button when entering comments I recieve the error ...
  7. N

    Help with string functions

    I have a variable set to: "L:\VoicenetSQL\project\tampa\Politic\NGEV1\File.csv" I need to replace the "L:\" with "\\ITITPAFS02\pds\" so that the variable contains the value: "\\ITITPAFS02\pds\VoicenetSQL\project\tampa\Politic\NGEV1\File.csv" Does anyone know how to do this? Thanks, Ninel
  8. N

    Getting result of query within

    I am trying to execute a query from .net. The query is just a count of a table: "SELECT Count(*) FROM Table1" How do I get the result of the query into a variable? I don't need to set it to any kind of control. Thanks, Ninel
  9. N

    Creating stored procedures with VB.NET

    I have to create databases and stored procs based on a user's prompt through a web page. Is there a way to create a stored proc within VB.NET? Thanks, Ninel
  10. N

    Issues with DLLs

    We have a 3rd party company that created 3 dlls for us that I need to use in my code. My app is written in, but it is a web page. I referenced all 3 dlls within my application (there were no exclamation points near the references in the solution explorer). When running the aspx page I...
  11. N

    Converting C# to

    I have samples of C# code that I need to use to instantiate an object. I need to convert it to I have a dll called ProjectUtilities. It is referenced in .net as "InteractiveSoftworks.VoiceNet.ProjectUtilities" I need to instantiate the ProjectManager object of the dll, but in order to do...
  12. N

    Importing csv file to SQL Server Using VB.Net

    I am doing this on my local machine. I got it working with the following code with one exception: Private Function ImportLeadFile(ByVal projectfile As String, ByVal sLeadFile As String, ByVal DATABASE As String) As Boolean Dim objConn As nsSqlClient.SqlConnection Dim ds As New...
  13. N

    Importing csv file to SQL Server Using VB.Net

    I have a csv file that is selected by a user. The csv file contains one column (phone number). I need to import this file into a table on sql server using I've tried the following code: Dim objConn As nsSqlClient.SqlConnection Dim ds As New DataSet Dim m_strConnection As String =...
  14. N

    Restoring database programatically.. error

    I need to programmatically backup a "template" database and restore it under a different name. The template database just contains the structure with stored procs, but no data. What I need to do is everytime we get a new project I need to backup the template db and restore it with the new...
  15. N

    Backup and Restore SQL database with

    I have the following code: Dim oSQLServer As New SQLDMO.SQLServer Dim oBackup As New SQLDMO.Backup Dim oRestore As New SQLDMO.Restore Dim BACKUPFILE As String Dim DATABASE As String BACKUPFILE = "C:\VoicenetSQL\project\tampa\Politic\" & ProjectFolder & "\VoiceNet_TemplateBackup.bkp"...
  16. N

    String functions

    I have the following path of a file: "L:\VoicenetSQL\Project\Tampa\Politic\AT0000\Test.csv" I need to pull out the folder name where the file resides. In this case I would need "AT0000". How can I use the Instr function to do this? Or can I use something else? Thanks, Ninel
  17. N

    Populating dropdown within a datagrid

    I have a datagrid on my web form that needs to contain a dropdown within each row. Here is the code I have so far: HTML: Just the template column of datagrid: <asp:TemplateColumn HeaderText="Network Access Group"> <ItemTemplate> <asp:DropDownList id="ddlNetworkAccessGroup"...
  18. N

    Redirection Error

    I am trying to redirect to another page within my aspx page. Here is my code: Response.Redirect("IncidentReviewDetailUpdate.aspx?CommentHistoryId=1&IncidentId=2&IncidentType=DATA &Status=OPEN") I'm getting a "Redirect URI cannot contain newline characters." error. I don't see anything wrong...
  19. N

    Dynamically adding/removing columns in datagrid

    create a report by allowing users to select certain criteria from dropdownlistbox. Dropdowns: site, project, startDate, endDate, reporting level (summary or agent detail) I have the following datagrid with 7 columns: <asp:datagrid id="grdResults" runat="server" Height="50px"...
  20. N

    Hyperlink control

    How can I capture if a hyperlink was clicked? Thanks, Ninel
Top Bottom