User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 361,556 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,047 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 260 | Replies: 2 | Solved
Reply
Join Date: Feb 2008
Posts: 54
Reputation: cmhampton is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 6
cmhampton's Avatar
cmhampton cmhampton is offline Offline
Junior Poster in Training

Data Class works on local debug, but not on hosted server.

  #1  
Apr 16th, 2008
I have a data layer class built with the dataset designer that I have added as a reference (compiled dll) in a project. When I run the app locally from Visual Studio, it runs just fine. However when I move it to the hosted server, I get "Type 'H2C2DataLayer.h2c2DataSet.topicsDataTable' is not defined."

Here's some code:

  1. Try
  2. Dim adp_hotTopic As H2C2DataLayer.h2c2DataSet.topicsDataTable = GetTopics()
  3.  
  4. rptNav.DataSource = adp_hotTopic
  5. rptNav.DataBind()
  6.  
  7. Catch ex As Exception
  8. lblDiagnostics.Text = ex.Message & "<br />" & ex.StackTrace
  9. End Try
  10.  

For some reason, it errors out on line 2, even though it's inside a try/catch. Can't figure that one out either. The exception should be caught and dumped to the diagnostics label.

Here's some code from the class:

  1. Public Class Data
  2. Public Shared Function GetTopics() As h2c2DataSet.topicsDataTable
  3. Dim dt As New h2c2DataSet.topicsDataTable
  4. Dim taTopics As New h2c2DataSetTableAdapters.topicsTableAdapter
  5.  
  6. dt = taTopics.GetData()
  7.  
  8. Return dt
  9. End Function
  10. End Class

There's obviously more to the class, but it doesn't matter because whatever function I call, I get the same error.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2006
Location: England
Posts: 147
Reputation: ptaylor965 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 19
Sponsor
ptaylor965's Avatar
ptaylor965 ptaylor965 is offline Offline
Junior Poster

Re: Data Class works on local debug, but not on hosted server.

  #2  
Apr 16th, 2008
First i would try using standard DataTables as it is possible that the server has not got the prerequisites installed for H2C2DataLayer.h2c2DataSet.topicsDataTable

Try
Dim SQLTable as new DataTable
Last edited by ptaylor965 : Apr 16th, 2008 at 6:30 pm.
Peter Taylor
Visual Basic.NET Application Developer

TaylorsNet
http://www.taylorsnet.co.uk
Reply With Quote  
Join Date: Feb 2008
Posts: 54
Reputation: cmhampton is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 6
cmhampton's Avatar
cmhampton cmhampton is offline Offline
Junior Poster in Training

Re: Data Class works on local debug, but not on hosted server.

  #3  
Apr 17th, 2008
Thanks for the feedback. It turns out that it was actually a problem on the server. I talked to the person in charge of our hosting servers and he said that the folder was configured as an app under the virtual directory, but not the virtual host. Once he changed that, it worked perfectly.

I never realized there was a difference. Not that it matters because I don't have control over that anyway and would have never known.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 2:18 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC