| | |
Compilation Error
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: May 2006
Posts: 32
Reputation:
Solved Threads: 0
i wrote this code in the display of a page
sub Display()
dim strcon as string ="Provider=Microsoft.Jet.OLEDB.4.0;DataSource =Sales.mdb"
dim strcommand as string ="Select * from sales"
dim myconnect as oledbconnection = new oledbconnection
dim myAdaptor as oledbDataAdapter = new oledbDataAdapter
dim salesDS as DataSet = new DataSet myconnect.ConnectionString=strcon myAdaptor.SelectCommand=new oleDbComman(strcommand,myconnect) myAdaptor.selectCommand.connection.open
myAdaptor.fill(salesDS,"sales")
SalesTable.DataSource=salesDS.Tables("Sales")
SalesTable.DataBind End sub
but there is a compilation error appear ,,,
this is the error :rolleyes:
Compiler Error Message: BC30451: Name 'SalesTable' is not declared.
Source Error:
Line 19: myAdaptor.selectCommand.connection.openLine 20: myAdaptor.fill(salesDS,"sales")Line 21: SalesTable.Data Source=salesDS.Tables("Sales")Line 22: SalesTable.DataBindLine 23:
sub Display()
dim strcon as string ="Provider=Microsoft.Jet.OLEDB.4.0;DataSource =Sales.mdb"
dim strcommand as string ="Select * from sales"
dim myconnect as oledbconnection = new oledbconnection
dim myAdaptor as oledbDataAdapter = new oledbDataAdapter
dim salesDS as DataSet = new DataSet myconnect.ConnectionString=strcon myAdaptor.SelectCommand=new oleDbComman(strcommand,myconnect) myAdaptor.selectCommand.connection.open
myAdaptor.fill(salesDS,"sales")
SalesTable.DataSource=salesDS.Tables("Sales")
SalesTable.DataBind End sub
but there is a compilation error appear ,,,
this is the error :rolleyes:
Compiler Error Message: BC30451: Name 'SalesTable' is not declared.
Source Error:
Line 19: myAdaptor.selectCommand.connection.openLine 20: myAdaptor.fill(salesDS,"sales")Line 21: SalesTable.Data Source=salesDS.Tables("Sales")Line 22: SalesTable.DataBindLine 23:
![]() |
Similar Threads
- compilation error (C++)
- Writing to an Access Database (Visual Basic 4 / 5 / 6)
- compilation error (C++)
- error message in outlook 2003 (Windows NT / 2000 / XP)
- Compilation error urgent? (VB.NET)
- Compilation Error Handles cmdLogin.ServerClick (ASP.NET)
- please help with these error problems (C++)
Other Threads in the ASP.NET Forum
- Previous Thread: Web Config file error
- Next Thread: Sending mail when time is expired!!!
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox class click commonfunctions compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock deployment development dgv dropdownlist dropdownmenu dynamic edit embeddingactivexcontrol expose findcontrol flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery list login menu microsoft mono mssql multistepregistration nameisnotdeclared numerical objects order panelmasterpagebuttoncontrols problem ratings rotatepage save schoolproject search security serializesmo.table silverlight smartcard sql sqlserver2005 ssl suse textbox tracking unauthorized validation vb.net video virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment webservice wizard xml youareanotmemberofthedebuggerusers





