<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: problem with db query, because of codeconverting</title><link>https://www.infopathdev.com:443/forums/thread/14813.aspx</link><pubDate>Tue, 03 Oct 2006 16:18:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14813</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14813.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14813</wfw:commentRss><description>Well, congratulations! It's great to hear you got it working!</description></item><item><title>Re: problem with db query, because of codeconverting</title><link>https://www.infopathdev.com:443/forums/thread/14812.aspx</link><pubDate>Wed, 27 Sep 2006 09:24:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14812</guid><dc:creator>dennis d.</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14812.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14812</wfw:commentRss><description>okay got it almost complete&lt;br /&gt;took me 1 day of pure headache ^^&lt;br /&gt;but, you know, it´s worth it when it´s working :)&lt;br /&gt;&lt;br /&gt;just another useless post, sorry about that</description></item><item><title>problem with db query, because of codeconverting</title><link>https://www.infopathdev.com:443/forums/thread/12952.aspx</link><pubDate>Tue, 26 Sep 2006 09:35:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12952</guid><dc:creator>dennis d.</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12952.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12952</wfw:commentRss><description>Hi, i have got a little problem, so i had to change a whole (working) form from vbscript to jscript.&lt;br /&gt;Thing is, i wanted the form to show up in an email body as it looks like in infopath.&lt;br /&gt;i found out, that using vbscript i can not accomplish that (when i add xDocument.DOM.xml to the email body it just looks like rubbish)&lt;br /&gt;i also found out, that the stlye i need is easy to realize in jscript just as simple as:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var oEnvelope = XDocument.View.Window.MailEnvelope;&lt;br /&gt;	oEnvelope.To = "insertmailhere";&lt;br /&gt;	oEnvelope.Visible = true;&lt;br /&gt;	oEnvelope.Send = true; &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;it looks great in the emails.&lt;br /&gt;&lt;br /&gt;so i had to create a new form, to make sure the language is jscript. but i have a problem to manage the database handlings i coded in vbscript.&lt;br /&gt;&lt;br /&gt;i need to convert this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Sub XDocument_OnLoad(eventObj)&lt;br /&gt;set conn = CreateObject("ADODB.Connection")&lt;br /&gt;	conn.Provider="Microsoft.Jet.OLEDB.4.0"&lt;br /&gt;	conn.Open "d:/folder/database.mdb"&lt;br /&gt;&lt;br /&gt;	set rs=CreateObject("ADODB.recordset")&lt;br /&gt;	set ts=CreateObject("ADODB.recordset")&lt;br /&gt;	&lt;br /&gt;	rs.Open "select * from Personal", conn, 3, 3&lt;br /&gt;	dim temp, mail&lt;br /&gt;	&lt;br /&gt;	do while not rs.EOF&lt;br /&gt;		if not isnull(rs.Fields("attributeA")) then&lt;br /&gt;			set temp = rs.Fields("attributeA")&lt;br /&gt;			ts.Open "select * from Personal", conn, 3, 3&lt;br /&gt;			do while not ts.EOF&lt;br /&gt;				if (ts.Fields("sname") = temp) then&lt;br /&gt;					rs.Fields("emailname").value = ts.Fields("emailname").value&lt;br /&gt;					if (master = "") then&lt;br /&gt;						master = (master + ts.Fields("emailname").value)&lt;br /&gt;					else master = (master + "; " + ts.Fields("emailname").value)&lt;br /&gt;					end if&lt;br /&gt;				end if&lt;br /&gt;				ts.Movenext&lt;br /&gt;			loop&lt;br /&gt;			ts.close&lt;br /&gt;		end if&lt;br /&gt;		rs.Movenext&lt;br /&gt;	loop&lt;br /&gt;	rs.Close&lt;br /&gt;   set rs = nothing&lt;br /&gt;End Sub&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;into jscript&lt;br /&gt;&lt;br /&gt;:(&lt;br /&gt;&lt;br /&gt;don´t kill me if the code looks messy, i´m using vbscript for 1,5 weeks now, so it could be quite chaotic ^^&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;the code does this:&lt;br /&gt;cycle through the db in search for the first object, that has an entry to attributeA&lt;br /&gt;cycle again to find the entry where name = attributeA&lt;br /&gt;set attributeA´s email-field to name´s email-entry&lt;br /&gt;the "master" variable is not important, it´s just for the .To field&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;i have been quite glad to accomplish that within so little knowledge of the language, but now i need some help&lt;br /&gt;&lt;br /&gt;so i would like to ask some questions on jscript:&lt;br /&gt;&lt;br /&gt;how can i query the database for one special entry by cycling through the db (e.g. "search db for the entry, where name = dennis")&lt;br /&gt;i think ...movenext or nextNode() doesn´t work&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;thanks&lt;br /&gt;dennis</description></item></channel></rss>