Problem I’ve created a very simple ASP.NET 2.0 application. I can run this with no problems using the Built-in Web Server. However, if I publish it and try running the application by typing http://localhost/talentdata/default.aspx directly in the browser window, I get the following error: Server Error in ‘/talentdata’ Application. The path ‘/talentdata/App_GlobalResources’ maps to a […]
Author: Melvin
Convert Julian Dates in SQL SERVER
SQL SERVER JULIAN TO DATE (WHEN DOWNLOADING JULIAN DATE) date field has to be nvarchar or varchar or character. declare @DateP char(10) select @datep=107277 — ALSO OK FOR 99 YEARS select dateadd(dd,@datep-(@datep/1000)*1000-1, convert(datetime,’01/01/’+ right(convert(varchar,@datep/1000),2))) as Date_ENT
sp_change_users_login (Transact-SQL)
Syntax sp_change_users_login [@Action =] ‘action’ [,[@UserNamePattern =] ‘user’] [,[@LoginName =] ‘login’] Arguments [@Action =] ‘action’ Describes the action to be performed by the procedure. action is varchar(10), and can be one of these values. Auto_Fix Links user entries in the sysusers table in the current database to logins of the same name in syslogins. It […]
PHP – Turning Off Error Reporting
Add the following to your PHP code: error_reporting(5); This will close all error reportings.
GridViewRow selectedRow = (GridViewRow)(((Control)e.CommandSource).NamingContainer);
Gridview – Getting the RowIndex
The following syntax sets the rowindex equal to the specific row number: int rowindex = ((GridViewRow)((Control)e.CommandSource).Parent.Parent).RowIndex;
For example – inserting value in the empty gridview: protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == “Insert”) { TextBox txt = (((Control)e.CommandSource).NamingContainer).FindControl(“txtTest”) as TextBox; //do insert action } } Another way to do this is by getting EmptyDataTemplate table and its controls: if (e.CommandName == “Insert”) { Table table = (Table)GridView1.Controls[0]; TextBox […]
Inner Join On Two SQL Databases
SELECT t1.columnName, t2.columnName FROM databaseName.user.table AS t1 INNER JOIN databaseName.user.table AS t2 ON t1.id = t2.id
INSERT INTO MyTable (FirstCol, SecondCol) SELECT ‘First’, 1 UNION ALL SELECT ‘Second’, 2 UNION ALL SELECT ‘Third’, 3
Open your Internet Information Services manager and from the [your machine]/Web Sites/ Default Web Site node select the virtual folder which stores your project. Right Click and select Properties to select the ASP.NET tab page. Make sure the correct version ASP.NET Version is selected. I have VS.NET 2003 and 2005 beta 1 running side-by-side on […]