That's right, you can only use the validation controls for controls that have runtat=server parameter. You can always use JavaScript to do validation on the client instead.
"Taxes are the fees we pay for civilized society" G.W.
I have a repeated control that I populate from my MS SQL DB.
Now I check one of the returned values, so far I'm using this code:
<%If Container.DataItem("fldSHARE") = "1" Then %>
<td>Shared</td>
<%else%>
<td>Not Shared</td>
<%End IF%>
When I run the code I receive an error: BC30451...
Is there a way to insert records that are returned by a select statement ?
I have 2 identical tables, each with the same structure, but different names. I want to query one table and insert the result into another one.
I'm using MS SQL. Thanks :)
"Taxes are the fees we pay for civilized...
Nothing worked until I've used
strVALUE(2) = MyRead.GetValue(2) & ""
That's the only thing that wors :) Who knows why .....
Thanks guys!
"Taxes are the fees we pay for civilized society" G.W.
Nope, still nothing, this fails on the first line:
Dim strVal2 As Int32 = CType(MyRead.GetInt32(2), Int32)
The reason is that even though the character_maximum_length is supposed to be an int32 datatype, it's not. I even tried to convert (cast) the character_maximum_length from the SQL string...
I'm completely lost, no matter what I try I can not get it to work ... thanks for the suggestions above ... still not working.
Apparently the datatype for character_maximum_length is dbtype_I4 returned using GetDatTypeName, the GetFieldType
returns system.int32. When I try to get the value...
I did just that, thinking it could be int16, eventhough the return datatype is int32, doesn't work :) Same error.
"Taxes are the fees we pay for civilized society" G.W.
I'm using the following to get the table structure:
SQL = "SELECT column_name, data_type, character_maximum_length FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '" & strTABLE & "'"
Call OPEN_DB()
Dim MyCMD As New OleDb.OleDbCommand(SQL, MyConn)...
I have a DataRepeater that I bind my data to, now I want a checkbox to be placed in each item and then
when I click the button I want to get list of values from those checkboxes. How can I do that ?
For some reason I can not reference controls I place in the <ItemTemplate> of the DataRepeater...
Thanks JCruz063, do you have any samplec code that I can look at to see how to do it ?
"Taxes are the fees we pay for civilized society" G.W.
I have 2 tables, 1 containing categories (parent) and another one containing sub-categories (children).
The sub-categories table has a reference to the parent in fldPID field:
CREATE TABLE [tbl_m_cate] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[fldNAME] [varchar] (150) NULL ,
) ON [PRIMARY]...
This would be per page setting though, is there a way to that for the entire project wihtout having to import the namespace for each page ?
"Taxes are the fees we pay for civilized society" G.W.
Thanks link9, worked like a charm :)
Do you know how I can import it so I can use only the function name rather then the whole reference
project.module.function ......
I'm using VS.NEt 2002
"Taxes are the fees we pay for civilized society" G.W.
I have a module where I keep all my common functions, now I want to use one of the functions like this in the page.aspx file:
<td align="Center"><%#CONVERT_TXT(Container.DataItem("fldACTIVE"))%></td>
The function CONVERT_TXT is decalred pulic in the module.
When I put the function in the...
Thanks guys, makes it clear. The connection pooling is done by default in .NET right ? No need to set-up anything ?
"Taxes are the fees we pay for civilized society" G.W.
I think the "Connection = Nothing" argument was my ASP 3.0 talking :)
What you are saying is that if I need to tap into my DB say 4 times on 1 page, it doesn't matter that I have to open the DB connection 4 times as well. It's better then opening it once and closing it once. Right ...
My questions is very simple (I think) I'd like your opinion where to open the DB connection. In classic ASP I'd open the connection near the top of the page where I'd need it and close it with the last trip to the DB near the bottom of the page. I'd only have 1 connection per page.
Can I...
Yes, that'd be too easy :)
I'm looking for a solution not to bound it to a control.
There will be only 1 row returned (summary, average, count etc.) so there is no need to use a Datagrid.
"Taxes are the fees we pay for civilized society" G.W.
How can I get a simple return of data from my DB using ASP.NET (VB.NET). In classic ASP I'd do something like this:
SQL = "SELECT COUNT(ID) AS C_COUNT FROM table"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open SQL, MyConn
IF NOT RS.EOF THEN
COUNTER = trim(RS("C_COUNT"))
END...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.