P
Paul Evans
Hi,
Could anyone help me?
I'm trying to create a datagrid using the following code. It works fine
except the coloum that is supposed to display the entrydate is blank. All
the other information displays correctly.
<%@ Import Namespace="System.Data.SqlClient" %>
<Script Runat="Server">
Sub Page_Load
Dim condb112944995 As SqlConnection
Dim cmdSelect As SqlCommand
condb112944995 = New SqlConnection(
"Server=************************;UID=************;PWD=********;Database=***********"
)
cmdSelect = New SqlCommand( "Select u_id, u_manuscripttitle,
u_manuscriptauthor, u_genre, u_wordcount, u_critiquecount, u_entrydate From
ManuscriptList", condb112944995 )
condb112944995.Open()
dgrdUserList.DataSource = cmdSelect.ExecuteReader()
dgrdUserList.DataBind()
condb112944995.Close()
End Sub
</Script>
I used the following code to create the table on the SQL server.
CREATE TABLE ManuscriptList
(
u_id INT NOT NULL IDENTITY,
u_manuscripttitle VARCHAR( 100 ),
u_manuscriptauthor VARCHAR( 100 ),
u_genre VARCHAR( 100 ),
u_wordcount VARCHAR( 100 ),
u_critiquecount VARCHAR( 100 ),
u_entrydate DATETIME Default getDate()
)
Is the problem something to do with the last line [i.e. u_entrydate DATETIME
Default getDate()] or is it something to do with the ASP.NET code?
Thanks for your time
Paul Evans
Could anyone help me?
I'm trying to create a datagrid using the following code. It works fine
except the coloum that is supposed to display the entrydate is blank. All
the other information displays correctly.
<%@ Import Namespace="System.Data.SqlClient" %>
<Script Runat="Server">
Sub Page_Load
Dim condb112944995 As SqlConnection
Dim cmdSelect As SqlCommand
condb112944995 = New SqlConnection(
"Server=************************;UID=************;PWD=********;Database=***********"
)
cmdSelect = New SqlCommand( "Select u_id, u_manuscripttitle,
u_manuscriptauthor, u_genre, u_wordcount, u_critiquecount, u_entrydate From
ManuscriptList", condb112944995 )
condb112944995.Open()
dgrdUserList.DataSource = cmdSelect.ExecuteReader()
dgrdUserList.DataBind()
condb112944995.Close()
End Sub
</Script>
I used the following code to create the table on the SQL server.
CREATE TABLE ManuscriptList
(
u_id INT NOT NULL IDENTITY,
u_manuscripttitle VARCHAR( 100 ),
u_manuscriptauthor VARCHAR( 100 ),
u_genre VARCHAR( 100 ),
u_wordcount VARCHAR( 100 ),
u_critiquecount VARCHAR( 100 ),
u_entrydate DATETIME Default getDate()
)
Is the problem something to do with the last line [i.e. u_entrydate DATETIME
Default getDate()] or is it something to do with the ASP.NET code?
Thanks for your time
Paul Evans