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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 19th, 2006, 09:08 AM
ammu2978 ammu2978 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Posts: 7 ammu2978 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 53 m 11 sec
Reputation Power: 0
Unhappy ASP code inside WML

hi, I am new to the forum
I am developing an application using WML and ASP.
When i mix ASP code in WML my WAP simultaor is showing "unknown response"
my code was working fine..till i inserted <select > and <option> tag to create a list box.My listbox retrieves values
from sql table
here is a part of my code.........

<%Response.ContentType="text/vnd.wap.wml"%>
<%Response.write("<?xml version=""1.0""?><!DOCTYPE wmlPUBLIC ""-//WAPFORUM//DTD WML 1.1//EN""""http://www.wapforum.org/DTD/wml_1.1.xml"">")%>
<wml>
<card>
<p>

<%
Dim username_querystring, password_querystring,objconn,objrs,strsql,objrs1,strsql1
username_querystring=request.querystring("username")
password_querystring=request.querystring("password")



Set objconn=Server.CreateObject("ADODB.Connection")
objconn.Open="Provider=SQLOLEDB;Data Source=10.100.1.6;Database=" ";User ID=" ";Password=" ";"


set objrs = Server.createobject("ADODB.recordset")
strsql="select username,password from web.dbo.users where username='"&username_querystring&"'"
objrs.open strsql,objconn


set objrs1 = Server.createobject("ADODB.recordset")
strsql1="select distinct group_name from web.dbo.groups"
objrs1.open strsql1,objconn


if objrs.BOF then
response.write "This is not a valid username"
response.write "<BR>"

else

objrs.MoveFirst
do while not objrs.EOF

if (strComp(objrs("password"),password_querystring,vbTextCompare)=0) then
%>



</p>
<p>

Your Message<input name="message" size="20"/><br/>
Group<select name="group"><br/>

<%do while not objrs1.eof%>

<option value="<%=objrs1("group_name")%>"><%=objrs1("group_name")%></option>


<%objrs1.movenext
loop
%>
</select>
</p>

<p>
<anchor>
<go method="get" href="message.asp" >
<postfield name="message" value="$(message)"/>
<postfield name="group" value="$(group)"/>
<postfield name="username" value="<%=username_querystring%>"/>
</go>
submit data
</anchor>


</p>


<%

else
response.write"your password is not correct"
end if
objrs.movenext
loop

end if

objrs.Close
set objrs= Nothing

objrs1.close
set objrs1= nothing

ObjConn.close
Set Objconn =Nothing


%>


</card>
</wml>






Please help me. thanks!

Reply With Quote
  #2  
Old June 19th, 2006, 07:16 PM
vrspectre's Avatar
vrspectre vrspectre is offline
I see semi-colons
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Location: Portland, OR
Posts: 297 vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 10 h 38 m 59 sec
Reputation Power: 16
Send a message via AIM to vrspectre Send a message via Yahoo to vrspectre
What's the WML that it's outputting?

Firefox has a wml browser you can use that will allow you to view the source code.

My guess would be that one of your objrs1("group_name") things is outputting something funny.
__________________


Reply With Quote
  #3  
Old June 28th, 2006, 02:37 AM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Dev Shed God 8th Plane (8500 - 8999 posts)
 
Join Date: Feb 2002
Location: Finland
Posts: 8,670 jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 3 Weeks 4 Days 6 h 10 m 50 sec
Reputation Power: 1618
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
Opera too can render wml pages.
__________________
Cheers,

Jamie


# skiFFie | Home of the 'accessibility module' for Drupal
# Jamie Burns [me] Accessibility Module [drupal]
# guidelines | search | wap resources | not getting help | fold to cure

# Any form of employment is strictly prohibited ......


__________________

Let the might of your compassion arise to bring a quick end
to the flowing stream of the blood and tears .....
Please hear my anguished words of truth.

__________________

Reply With Quote
  #4  
Old July 4th, 2006, 02:43 AM
ammu2978 ammu2978 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Posts: 7 ammu2978 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 53 m 11 sec
Reputation Power: 0
Smile

Thanks ..my code is working now

Quote:
Originally Posted by vrspectre
What's the WML that it's outputting?

Firefox has a wml browser you can use that will allow you to view the source code.

My guess would be that one of your objrs1("group_name") things is outputting something funny.

Reply With Quote
  #5  
Old July 4th, 2006, 02:58 AM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Dev Shed God 8th Plane (8500 - 8999 posts)
 
Join Date: Feb 2002
Location: Finland
Posts: 8,670 jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 3 Weeks 4 Days 6 h 10 m 50 sec
Reputation Power: 1618
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
Care to tell people what was wrong?
May help someone in the future who has similar issue ....

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreWAP Programming > ASP code inside WML


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 2 hosted by Hostway