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...
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...
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...
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...
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?
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 ...
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:
Does anyone know how to do this?
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.
I need to create a stored procedure that has quite a few statements.
CREATE PROCEDURE usp_PoliticalProcessing
SET sPhone = RTrim(LTrim(Convert(varchar(30), Convert(numeric(20, 1), phone))))
SET sPhone = Substring(sphone, 1, patindex('%.%'...
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 vb.net, 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...
I have samples of C# code that I need to use to instantiate an object. I need to convert it to VB.net.
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...
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...
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 vb.net.
I've tried the following code:
Dim objConn As nsSqlClient.SqlConnection
Dim ds As New DataSet
Dim m_strConnection As String =...
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...
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"...
I have the following path of a file:
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?
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">
I am trying to redirect to another page within my aspx page.
Here is my code:
I'm getting a "Redirect URI cannot contain newline characters." error.
I don't see anything wrong...