WAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreWAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old April 7th, 2005, 07:22 AM
clemnihill clemnihill is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Ireland
Posts: 6 clemnihill User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 40 m 9 sec
Reputation Power: 0
Send a message via MSN to clemnihill
Question Can anyone figure this out?

Hi,

I have asp code that is part of a wap site to display database information but I'm getting an error when trying to access asp page from the wml page. The asp page opens fine with an emulator but only if directly browsed to. It returns an error if linked to from another site.

The following error is returned:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/wap/score/Soccer/laliga_scoreASP.asp, line 22

The asp page is below. It's possibly something small but its stopping most of my pages which are written in asp. Line 22 is the Database connection. I use IIS on my laptop to test the page but when it's online it doesn't work. Does something have to be changed in the code to make it work online?
Desperately need to find a solution so if any one can help me out here I would be hugely grateful.

Cheers,

Clem.

Code:
<% Response.ContentType = "text/vnd.wap.wml" %>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
 <%
  Dim strDBConn
  Dim CONN_DSN
  Dim DataConn
  Dim dbData
  Dim sqlSTR
  Dim i
  
  'Will use i to make card# increment
  i=1
  
  'Database Connection
  'DSN
  CONN_DSN = "Switchboard" 'modify this with your DSN name
  
  strDBConn = "DSN=" & CONN_DSN 
  'Open Database Connection
  Set DataConn = Server.CreateObject("ADODB.Connection") 
  DataConn.Open strDBConn, CONN_USER, CONN_PASS 'This is line22
  
  'Assemble SQL query for La Liga database
  sqlSTR = "SELECT * FROM tblLaLiga"
  
  'Execute SQL Query creating recordset dbData
  set dbData = DataConn.Execute(sqlSTR)
  
  IF NOT dbData.eof THEN'if recordset is not empty
   Do while not dbData.eof 'Do until you get to the end of the recordset
 %>
 <card id='card<%=i%>'  title='La Liga'>
 <do type='options' label='Next'>
 <go href='#card<%=i+1%>'/>
 </do>
 <do type='accept' label='Up'>
 <go href='/score/soccer.wml'/>
 </do>
 <p><b>02 March 2004</b></p><br>
	<%
    'Write Results
    Response.Write dbData("Home Team") & "  " & dbData("ScoreH") & "<br>" 'Show home team name, score, then <br> to next line
    Response.Write dbData("Away Team") & "  " & dbData("ScoreA") & "<br><br>" 'same as above, but 2 returns
    Response.Write dbData("Time") & "<br><br>" 'Show time, then 2 returns
    
	%>
<a accesskey='1' href='#card<%=i+1%>' title='Next'>Next</a><br/>
<a accesskey='2' href='/score/soccer.wml' title='Up'>Back to Scores</a></p>
  </card>

 <%  
 	'Increment i
 	i = i+1
 	
 	'Move to the next record before we loop
 	dbData.movenext

  loop
  END IF
  

  'Close Recordset and Dataconn
  dbData.close
  set dbData = nothing
  DataConn.Close
  set DataConn = nothing
  %>
  </wml>

Reply With Quote
  #2  
Old April 8th, 2005, 10:14 PM
idevweb idevweb is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 14 idevweb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 37 m 24 sec
Reputation Power: 0
I am somewhat new to wml myself. Its pretty easy to develop stuff, but hard to fix problems.

You might want to check mimes

I am currently having a similar problem. I use php mysql and wml. I have easily created a data access system, but it is so dang picky! it works great on most simulators, and most devices. But on one of my older nokia phones (6610) it only works sometimes.

Its weird.

I also had to add a .htaccess file in the wml content folder in order to run .php files with wml/xml in the code. Then specify wml headers with php.

Im not sure if this helps, but I hope so. GL!

Reply With Quote
  #3  
Old April 11th, 2005, 05:23 PM
Lab45 Lab45 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 18 Lab45 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 23 m 46 sec
Reputation Power: 0
Your DSN hasn't been defined

You need to define your connection string listed as "Switchboard" needs to be defined on any server running the asp "application"

to do this :
go to ControlPanel -> Administrative Tools -> Data sources (ODBC)

Select add and go through the steps. If you don't want to change the code name it Switchboard and you should be set.

This is an ASP bug not WML.

Let me know if this doesn't fix it as there are quite a few ways to configure your DSN.....

Reply With Quote
  #4  
Old April 12th, 2005, 12:14 PM
clemnihill clemnihill is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Ireland
Posts: 6 clemnihill User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 40 m 9 sec
Reputation Power: 0
Send a message via MSN to clemnihill
Hey Lab45,

Thanks for the help. I have a DSN called Switchboard on my IIS already and the site works fine on an emulator when opened directly but when linked to, it doesnt work. It returns an 'invalid data' message.
When I try loading the page on a real phone it displays a message 'response unknown'. I'm going to get in touch with my server people and see what they can tell me.

Cheers,

Clem.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreWAP Programming > Can anyone figure this out?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway