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 ?
Thanks in advance.
Last Visit: 31-Dec-99 18:00 Last Update: 23-Sep-23 20:46