i have problem ,in html that is inside in the asp.net code,i have table that have rows and colums i want to populate this table through database,bt my whole code is not working...and the following error msgs comes..the
command.text is not define.
tell me the proper way of executing this code.and tell me where i have mistakes
this is my whole code
'dim strConnectionString as new String
'strConnectionString="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password='';Initial Catalog=dbusa;Data Source=;"
dim conConnection as New OleDbConnection("Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password='';Initial Catalog=dbusa;Data Source=")
Dim cmd As New OleDbCommand
cmd.Connection = conConnection
Dim dr As OleDbDataReader
cmd.CommandText = "Select course_title,per_name,std_section from tblTT Group by course_title,per_name,std_section"
cmd.CommandType = CommandType.Text
dr = cmd.ExecuteReader
'Set rs = Server.CreateObject("ADODB.Recordset")
'Set rs2 = Server.CreateObject("ADODB.Recordset")
'rs.open "Select course_title,per_name,std_section from tblTT Group by course_title,per_name,std_section", dbCon
<% while dr.read %>
dim strConnectionString1 as new string="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password='';Initial Catalog=dbusa;Data Source="
conConnection1 = New OleDbConnection(strConnectionString1)
Dim cmd1 As New OleDbCommand
cmd1.Connection = conConnection1
Dim dr1 As OleDbDataReader
cmd1.CommandText = "Select time_slot_day,time_slot_from,time_slot_to from tblTT where course_title='" & Session.item("Course_title") & "' AND per_name='" & Session.item("Per_name") &"' AND std_section='" & Session.item("std_section") & "'" "
cmd1.CommandType = CommandType.Text
dr1 = cmd1.ExecuteReader
'rs2.open "Select time_slot_day,time_slot_from,time_slot_to from tblTT where course_title='" & rs("Course_title") & "' AND per_name='" & rs("Per_name") &"' AND std_section='" & rs("std_section") & "'" , dbCon
if Trim(dr.item("std_section"))="A" OR Trim(dr.item("std_section"))="B" OR Trim(dr.item("std_section"))="C" then
response.Write(" (Section: ") & dr.item("std_Section") & " )"
Are you sure that's the code that you are using? It shouldn't even be possible to run. There is a syntax error in the line that set the value of the cmd1.CommandText. There is an extra quote at the end that shouldn't be there.
I'm only new to web programming and I have a this problem. I am developing an asp.net application where in a remote access will triger 'Server A' to access my aspx page with query string. My aspx page will process the query string then access 'Server A' (php script)passing values as query string. There is no browser involved.
I'm having trouble interpreting what you are saying, but it seems as though you want to know if Sql Server 2000 will work with ASP.NET 2.0/VS 2005? Well the answer is yes, the connection string is exactly the same as it was in 1.1 and VS 2005 can connect to a SQL server 2000 db just like it would a SS 2005 Database.
I need to send email to number of persons whose id's are stored in excel sheet. I have to fetch this and use outlook express to send this mail to all of them but it should send one after another. It should be develop in asp.net 2.0 only by pressing a single key. Help me please. Thanks.
I has a objectdatasource what return a list of things. This ods is linked to several DropDownLists. In Selecting event, how I can know what dropdownlist was responsible to execute this event? Or this event will be called just one time?
In the Selecting event of the ObjectDataSource, you cannot determine which dropdownlist is calling the datasource control as it has no idea about the caller. Also, if you have the EnableCaching set to false, the Selecting event gets fired multiple times depending on the number of controls using it. If you have this property enabled, this event is called just one time, and the result is cached internally and reused for the next calls. In this case, you might consider creating a single handler for the DataBound event of the dropdownlists, and you can determine the caller via the sender parameter in this event handler.
I am using OWC(Office web component) 11 to draw a basic bar chart in my webpage. On Y -axis I would like to have date values. But it shows date ranges from 1899 to 1900 only. Can anybody help me how can I assign date range to Y axis ?
Hi I have a repeater control which return more than 200 records.
is there any way that i can display scroll bar in the repeater control between header and footer?
so that when user scrolling the records in the repeater header and footer are always visible, changing only the records.
It would depend on the template definitions you are using in your Repeater.
You certainly could use a <div style='overflow: auto;'> tag in your Repeater header template (and a matching </div> tag in the footer template) with a fixed height and width to establish your scrolling area.
In IE everything works perfectly, but in Firefox and Opera the container div only expands to the size of the content in the #Center div, in other words, if the right or left column is longer than the center column then it overflows out of #Container. Is there something I'm doing wrong, or is this an insurmountable problem?
Actually, it's in Firefox and Opera that the layout is displayed correctly. There is a bug in IE that makes is always expand elements to the size of it's children, even when it shouldn't.
Elements that are floating does not affect the size of the parent. If you want the parent to expand to the size of the floating children, place a non-floating element as a last child, and use "clear: both;" to place it below the floating children.
I figured IE was the one that had it wrong since it was the odd man out. The solution was a lot simpler than I thought it would be and works like a charm, thanks a lot
One last small problem, both IE and Opera have a margin on the top and bottom of the container div, but firefox only has the margin on the top. As you see in my first post Container is set to margin: 20px auto;