ActiveX Recordset Charset
Hi,
I am a problem with select to database. I use the ActiveX ADO_Recordset GetString.
The problem is with ż and ł, on my database is just, but with the select come z and l.
How is the problem?
Its work with excel.
Thank
Clecle
I'm guessing that the ActiveX GetString method is returning ASCII. I don't think you can set/change that.
I've used the GetString method for years, but I haven had to work with unicode.
You may need to query the DB with a different method to get the unicode data:
http://ni.lithium.com/t5/LabVIEW/Database-query-of-unicode-string-returns-Ascii/m-p/1197625/highligh...
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness
Similar Messages
-
How do I get a recordset to display three images horizontally?
Hi,
I'm using DWCS3 with MAMP.
I want to display three images horizontally in a recordset. I have downloaded Tom Muck's extension horizontal looper and followed the instructions.
However when I tried to add the recordset navigation bar I ran into some problems.
If I add a repeat region to Tom Muck's extension then the page doesn't load.
If I don't add a repeat region to Tom's extension everything works really well except only one image displays rather than three.
Here is all of my code for the page.
Could someone help me please.
<?php require_once('Connections/connQuery.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_rshlimgs = 1;
$pageNum_rshlimgs = 0;
if (isset($_GET['pageNum_rshlimgs'])) {
$pageNum_rshlimgs = $_GET['pageNum_rshlimgs'];
$startRow_rshlimgs = $pageNum_rshlimgs * $maxRows_rshlimgs;
mysql_select_db($database_connQuery, $connQuery);
$query_rshlimgs = "SELECT * FROM image";
$query_limit_rshlimgs = sprintf("%s LIMIT %d, %d", $query_rshlimgs, $startRow_rshlimgs, $maxRows_rshlimgs);
$rshlimgs = mysql_query($query_limit_rshlimgs, $connQuery) or die(mysql_error());
$row_rshlimgs = mysql_fetch_assoc($rshlimgs);
if (isset($_GET['totalRows_rshlimgs'])) {
$totalRows_rshlimgs = $_GET['totalRows_rshlimgs'];
} else {
$all_rshlimgs = mysql_query($query_rshlimgs);
$totalRows_rshlimgs = mysql_num_rows($all_rshlimgs);
$totalPages_rshlimgs = ceil($totalRows_rshlimgs/$maxRows_rshlimgs)-1;
$queryString_rshlimgs = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_rshlimgs") == false &&
stristr($param, "totalRows_rshlimgs") == false) {
array_push($newParams, $param);
if (count($newParams) != 0) {
$queryString_rshlimgs = "&" . htmlentities(implode("&", $newParams));
$queryString_rshlimgs = sprintf("&totalRows_rshlimgs=%d%s", $totalRows_rshlimgs, $queryString_rshlimgs);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<link href="styles/orderlist3.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="lightbox_assets/css/lightbox.css" type="text/css" media="screen" />
<script src="lightbox_assets/js/prototype.js" type="text/javascript"></script>
<script src="lightbox_assets/js/scriptaculous.js?load=effects" type="text/javascript"></script>
<script src="lightbox_assets/js/lightbox.js" type="text/javascript"></script>
<style type="text/css">
<!--
a:link {
color: #999966;
a:visited {
color: #FFFFFF;
a:hover {
color: #006600;
a:active {
color: #666699;
-->
</style></head>
<body class="oneColFixCtrHdr" onload="initLightbox()">
<div id="container">
<div id="header">
<h1>Header</h1>
<!-- end #header --></div>
<div id="mainContent">
<h3>Image catalog</h3>
<p> </p>
<table >
<tr>
<?php
$rshlimgs_endRow = 0;
$rshlimgs_columns = 3; // number of columns
$rshlimgs_hloopRow1 = 0; // first row flag
do {
if($rshlimgs_endRow == 0 && $rshlimgs_hloopRow1++ != 0) echo "<tr>";
?>
<td><p><a href="images/weddingprivate/mr_and_mrs_lowe_18_15.jpg" title="Mr and Mrs Lowe_18_15" rel="lightbox"><img src="<?php echo $row_rshlimgs['imagethumb_url']; ?>" alt="The bride to be getting ready" longdesc="http://The bride to be with her hairdresser" width="100" height="150" /></a></p>
<p><?php echo $row_rshlimgs['caption']; ?> <img src="images/Untitled-1.gif" alt="spacer" width="170" height="1" /></p>
<p> </p>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="6782561" />
<table>
<tr>
<td><input type="hidden" name="on0" value="Sizes" />
Sizes</td>
</tr>
<tr>
<td><select name="os0">
<option value="6x4">6x4 £3.00 </option>
<option value="7x5">7x5 £5.00 </option>
<option value="12x8">12x8 £6.50 </option>
</select>
</td>
</tr>
</table>
<input type="hidden" name="currency_code" value="GBP" />
<input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online." />
<img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
</form></td>
<?php $rshlimgs_endRow++;
if($rshlimgs_endRow >= $rshlimgs_columns) {
?>
</tr>
<?php
$rshlimgs_endRow = 0;
} while ($row_rshlimgs = mysql_fetch_assoc($rshlimgs));
if($rshlimgs_endRow != 0) {
while ($rshlimgs_endRow < $rshlimgs_columns) {
echo("<td> </td>");
$rshlimgs_endRow++;
echo("</tr>");
}?>
</table>
<table border="0">
<tr>
<td><?php if ($pageNum_rshlimgs > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_rshlimgs=%d%s", $currentPage, 0, $queryString_rshlimgs); ?>"><img src="images/First.gif" border="0" /></a>
<?php } // Show if not first page ?>
</td>
<td><?php if ($pageNum_rshlimgs > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_rshlimgs=%d%s", $currentPage, max(0, $pageNum_rshlimgs - 1), $queryString_rshlimgs); ?>"><img src="images/Previous.gif" border="0" /></a>
<?php } // Show if not first page ?>
</td>
<td><?php if ($pageNum_rshlimgs < $totalPages_rshlimgs) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_rshlimgs=%d%s", $currentPage, min($totalPages_rshlimgs, $pageNum_rshlimgs + 1), $queryString_rshlimgs); ?>"><img src="images/Next.gif" border="0" /></a>
<?php } // Show if not last page ?>
</td>
<td><?php if ($pageNum_rshlimgs < $totalPages_rshlimgs) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_rshlimgs=%d%s", $currentPage, $totalPages_rshlimgs, $queryString_rshlimgs); ?>"><img src="images/Last.gif" border="0" /></a>
<?php } // Show if not last page ?>
</td>
</tr>
</table>
<p> </p>
<p> </p>
<!-- end #mainContent --></div>
<div id="footer">
<p>Footer</p>
<!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>
<?php
mysql_free_result($rshlimgs);
?>Hi Charles,
Use [Dr%] Variable formula as =if(IsNull([Dr%]);0;[DR%])
Here IsNull returns the Boolean value of variable [Dr%] if its true then inserts 0 else the percentage values of failed tests based on the total number of assembly tests performed.
I Hope this is what you want to achieve....
Thanks....
Pratik -
How can I edit data in Microsoft access using ActiveX
I've tried to modify Read Access DB with ActiveX to edit an entry in my database, but I get the following error
Exception occured in DAO.Field, Update or CancelUpdate without AddNew or Edit..Did you try to do the same thing in LabVIEW (the same order, after you have the right reference to the recordset). I know this kind of problem from VB too. I didn't try it in LV but I supposed it should be the same.
Let me know if it doesn't work. -
How can I enter the data from the recordset into your insert query
Hi
i would like to know how I can enter the data from the recordset into your insert query without using a hidden field.
thanks
------------------------------------------------------------------------------------Below is the code------------------------------------------------------------------------------------- -----
<?php require_once('../../Connections/ezzyConn.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "frmpostComment")) {
$insertSQL = sprintf("INSERT INTO comments (com_topic, com_user, title, com_content, com_date, online_id) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['com_topic'], "int"),
GetSQLValueString($_POST['commentby'], "int"),
GetSQLValueString($_POST['title'], "text"),
GetSQLValueString($_POST['com_content'], "text"),
GetSQLValueString($_POST['com_date'], "text"),
GetSQLValueString($_POST['online_id'], "int"));
mysql_select_db($database_ezzyConn, $ezzyConn);
$Result1 = mysql_query($insertSQL, $ezzyConn) or die(mysql_error());
$insertGoTo = "index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location: %s", $insertGoTo));
$colname_rsCommentby = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_rsCommentby = $_SESSION['MM_Username'];
mysql_select_db($database_ezzyConn, $ezzyConn);
$query_rsTopics = "SELECT topic_id, topic FROM topics ORDER BY topic_date DESC";
$rsTopics = mysql_query($query_rsTopics, $ezzyConn) or die(mysql_error());
$row_rsTopics = mysql_fetch_assoc($rsTopics);
$totalRows_rsTopics = mysql_num_rows($rsTopics);
mysql_select_db($database_ezzyConn, $ezzyConn);
$query_rsOnline = "SELECT online_id, `online` FROM `online` ORDER BY online_id DESC";
$rsOnline = mysql_query($query_rsOnline, $ezzyConn) or die(mysql_error());
$row_rsOnline = mysql_fetch_assoc($rsOnline);
$totalRows_rsOnline = mysql_num_rows($rsOnline);
$colname_rsCommentby = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_rsCommentby = $_SESSION['MM_Username'];
mysql_select_db($database_ezzyConn, $ezzyConn);
$query_rsCommentby = sprintf("SELECT user_id, username FROM users WHERE username = %s", GetSQLValueString($colname_rsCommentby, "text"));
$rsCommentby = mysql_query($query_rsCommentby, $ezzyConn) or die(mysql_error());
$row_rsCommentby = mysql_fetch_assoc($rsCommentby);
$totalRows_rsCommentby = mysql_num_rows($rsCommentby);
?>
<?php include("../includes/access.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ezzybay - easy click, ezzy shopping</title>
<link href="../css/global.css" rel="stylesheet" type="text/css" />
<link href="../css/navigation.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<?php include("../includes/top.php"); ?>
<div id="content">
<div id="pageTitle">
<h2>CMS Section:</h2>
<p>Comment Topics Page</p>
</div>
<?php include("../includes/leftnav.php"); ?>
<div id="mainContent">
<form action="<?php echo $editFormAction; ?>" method="post" name="frmpostComment" id="frmpostComment">
<table align="center">
<caption>Post Comment</caption>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Topic:</td>
<td><select name="com_topic" class="listbox" id="com_topic">
<?php
do {
?>
<option value="<?php echo $row_rsTopics['topic_id']?>"><?php echo $row_rsTopics['topic']?></option>
<?php
} while ($row_rsTopics = mysql_fetch_assoc($rsTopics));
$rows = mysql_num_rows($rsTopics);
if($rows > 0) {
mysql_data_seek($rsTopics, 0);
$row_rsTopics = mysql_fetch_assoc($rsTopics);
?>
</select></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Title:</td>
<td><input name="title" type="text" class="textfield" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right" valign="top">Comment:</td>
<td><textarea name="com_content" cols="50" rows="5" class="textarea"></textarea></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Status:</td>
<td><select name="online_id" class="smalllistbox">
<?php
do {
?>
<option value="<?php echo $row_rsOnline['online_id']?>" <?php if (!(strcmp($row_rsOnline['online_id'], 2))) {echo "SELECTED";} ?>><?php echo $row_rsOnline['online']?></option>
<?php
} while ($row_rsOnline = mysql_fetch_assoc($rsOnline));
?>
</select></td>
</tr>
<tr> </tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="submit" class="button" value="Insert record" /></td>
</tr>
</table>
<input name="commentby" type="hidden" id="commentby" value="<?php echo $row_rsCommentby['user_id']; ?>" />
<input type="hidden" name="com_date" value="<?php echo date("d/m/y : H:i:s", time()) ?>" />
<input type="hidden" name="MM_insert" value="frmpostComment" />
</form>
</div>
</div>
<?php include("../includes/footer.php"); ?>
</div>
</body>
</html>
<?php
mysql_free_result($rsTopics);
mysql_free_result($rsOnline);
mysql_free_result($rsCommentby);
?>I'll keep it simple and only use the date as an example. Hopefully you get the concept from the example. Basically you create a recordset and insert the recordset value instead of the POST value into your insert query. In the example below I declared a variable for $the_date and entered the variable into the INSERT query instead of the hidden POST field.
<?php require_once('../../Connections/ezzyConn.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$the_date = date("d/m/y : H:i:s", time());
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "frmpostComment")) {
$insertSQL = sprintf("INSERT INTO comments (com_topic, com_user, title, com_content, com_date, online_id) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['com_topic'], "int"),
GetSQLValueString($_POST['commentby'], "int"),
GetSQLValueString($_POST['title'], "text"),
GetSQLValueString($_POST['com_content'], "text"),
GetSQLValueString($the_date, "text"),
GetSQLValueString($_POST['online_id'], "int"));
mysql_select_db($database_ezzyConn, $ezzyConn);
$Result1 = mysql_query($insertSQL, $ezzyConn) or die(mysql_error());
$insertGoTo = "index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location: %s", $insertGoTo));
?> -
Get Crystal Report XI R2 to work on 64 bit OS (win 2K3) web ActiveX viewer
Can anyone help me with the issue below, I have been working on this issue for long time and have intensively researched the internet and tried out few solutions but non worked for me.
<p>
<b>Overview:</b><br>
I am working on an application that was build with a classic ASP and VB6 COMs. The COMs load rpt file, this would be the report template, then it loads a recordset into the rpt file and gets displayed on the web page using ActiveX viewer. There are few activities done by the COMs, varying from changing formulas, updating header and footer, suppressing sections to loading data. We are using crystal report XI release 2 with SP4 and application works fully ok on Windows XP and Windows 2003 on the 32 bit OS. Now we are trying to deploy the application on a 64 bit environment and we realise that we can only do this on 64 bit in a 32 bit mode. As we have VB COMs and they can only work on a 32 bit system. So I have done the following in order to enable our application to work and for the reports to run.
<p>
1) Configure the IIS server to run in worker process isolation mode<br>
2) Enabling the 32bit mode by running this command <br>
cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 TRUE<br>
3) Install our COM application and give the required permission <br>
4) Install ASP files with rpt files and give the required permission<br>
With few attempts I managed to run our application on the 64 bit system using the 32 bit mode, but few reports still fails to display.
<p>
<b>Problem:</b><br>
I am unable to run and/or view crystal reports on a windows 2003 64 bit system. I have turned on the 32 bit mode so I am able to run COM objects and I am able to run my application and view crystal reports but some reports still fails with no error message. The failed reports display the crystal viewer with no data no page but only the top bar with crystal controls e.g. export, move pages etc.
<p>
<b>Analysis/investigation:</b><br>
I run the same application pointing to the same database as my 64 bit (32 bit mode) environment and run the reports with some data and it worked fine, so I saved the report and tried viewing on my 64 bit environment with simple crystal preview page. Unfortunately it was same result as report came back blank in the viewer with no pages even though if I open that report the crystal application it will show me data saved with it. I have to say on my windows 2003 32 bit system that was fully working, I needed to turn on isolation mode in IIS 6 (i.e. turn off worker processor mode) in order to get all my reports working, otherwise I would get the exact same issue that I have with the 64 bit system. However in my 64 bit system I canu2019t turn on isolation mode, as the 32 bit mode option requires the IIS to be set with worker processor mode or none of the COMs will work.
<p>
So please could you help with any suggestion, or solution if possible.
<p>
Many ThanksHi Ludek
<P>
Let me clarify a bit about the issue we been have:<br>
For example we have report-1.rpt and report-2.rpt, both are very similar and in fact report-2 have a little bit more information than report-1. So when I install our application on a webserver in Windows 2003 32 bit system, with Crystal Report XI R2 developer edition + SP4, both reports work perfectly fine and application save the report and show it on the crystal report ActivesX viewer. So I made copy of report-1.rpt and report2.rpt with data and kept it a side.
<P>
Now I install our application that is the asp files and COM objects on a 64 bit windows 2003 and turned on the 32 bit mode to enable our COMs to work. I then run our application pointing it to the same database I used with the other OS, and I tried to run report-1.rpt and report-2.rpt, so report-1.rpt has failed with the viewer showing but no pages and only the controls. However, the report-2.rpt worked fine with data showing ok. So I copied the 2 reports I generated from the other OS and pointed my view report asp page to these rpt files, again same result report-1.rpt failed and report-2.rpt worked ok.
<P>
So I guess what I am trying to say is we are using the exact same COMs on both OS and to generate on both reports, also pointing to the same database using the same connection string. The result is one report is failing on the 64 bit machine.
<P>
Now when I try to export/save the report-1.rpt, the report that come with no pages, I get the error below, this is the same error I get if I try to move to different pages.
<br><br>CRAXDRT Error Occured on Server.70 : Permission denied
<P>
Please let me know if I can provide more information.
<P>
Many thanks -
I have another issue with my summary/update processing. I have a form where members can list themselves for either needing or wanting boat/crew/housing. Below the form is a listing of all associated requests:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/ilcaData.asp" -->
<!--#include file="../../Connections/eventCalendar.asp" -->
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
If (CStr(Request("MM_insert")) = "needavailadd") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_eventCalendar_STRING
MM_editCmd.CommandText = "INSERT INTO needAvail (naType, memName, city, [state], phone, email, info, eventID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 3, Request.Form("naType")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 32, Request.Form("memName")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 18, Request.Form("city")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 2, Request.Form("state")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 12, Request.Form("phone")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202, 1, 48, Request.Form("email")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 202, 1, 75, Request.Form("info")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 5, 1, -1, MM_IIF(Request.Form("eventID"), Request.Form("eventID"), null)) ' adDouble
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "eventneedavail.asp"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%>
<%
Dim rsStates
Dim rsStates_cmd
Dim rsStates_numRows
Set rsStates_cmd = Server.CreateObject ("ADODB.Command")
rsStates_cmd.ActiveConnection = MM_ilcaData_STRING
rsStates_cmd.CommandText = "SELECT * FROM stateCodes"
rsStates_cmd.Prepared = true
Set rsStates = rsStates_cmd.Execute
rsStates_numRows = 0
%>
<%
Dim rsneedavailReq
Dim rsneedavailReq_cmd
Dim rsneedavailReq_numRows
Set rsneedavailReq_cmd = Server.CreateObject ("ADODB.Command")
rsneedavailReq_cmd.ActiveConnection = MM_eventCalendar_STRING
rsneedavailReq_cmd.CommandText = "SELECT * FROM needAvailReq"
rsneedavailReq_cmd.Prepared = true
Set rsneedavailReq = rsneedavailReq_cmd.Execute
rsneedavailReq_numRows = 0
%>
<%
Dim rsneedAvail__MMColParam
rsneedAvail__MMColParam = "0"
If (Request.Querystring("ID") <> "") Then
rsneedAvail__MMColParam = Request.Querystring("ID")
End If
%>
<%
Dim rsneedAvail
Dim rsneedAvail_cmd
Dim rsneedAvail_numRows
Set rsneedAvail_cmd = Server.CreateObject ("ADODB.Command")
rsneedAvail_cmd.ActiveConnection = MM_eventCalendar_STRING
rsneedAvail_cmd.CommandText = "SELECT * FROM eventneedAvail WHERE eventID = ?"
rsneedAvail_cmd.Prepared = true
rsneedAvail_cmd.Parameters.Append rsneedAvail_cmd.CreateParameter("param1", 5, 1, -1, rsneedAvail__MMColParam) ' adDouble
Set rsneedAvail = rsneedAvail_cmd.Execute
rsneedAvail_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rsneedAvail_numRows = rsneedAvail_numRows + Repeat1__numRows
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- InstanceBegin template="/Templates/mainLayout.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Welcome to the International Lightning Class</title>
<meta name="Keywords" content="Lightning, lightning sailboat, lightning class, international lightning class, lightning class sailboat, lightning class association" />
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="../../assets/favicon.ico" rel="shortcut icon" />
<link href="../../css/mainLayout2.css" rel="stylesheet" type="text/css" />
<link href="../../css/navMenu.css" rel="stylesheet" type="text/css" />
<link href="../../css/ilcaStyles.css" rel="stylesheet" type="text/css" />
<link href="../../css/document.css" rel="stylesheet" type="text/css" />
<script src="../../scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<!-- InstanceBeginEditable name="styles" -->
<link href="../../css/needAvail.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
//-->
</script>
<!-- InstanceEndEditable -->
<!-- InstanceParam name="setdatetype" type="text" value="" -->
<!-- InstanceParam name="cleanup" type="text" value="" -->
</head>
<body onload="" onunload="">
<%
Response.Buffer = True
If (Request.ServerVariables("HTTPS") = "on") Then
Dim xredir__, xqstr__
xredir__ = "http://" & Request.ServerVariables("SERVER_NAME") & _
Request.ServerVariables("SCRIPT_NAME")
xqstr__ = Request.ServerVariables("QUERY_STRING")
if xqstr__ <> "" Then xredir__ = xredir__ & "?" & xqstr__
Response.redirect xredir__
End if
%>
<div id="wrapper">
<div id="header">
<div id="hdrLink"><a href="../../index.asp"><img src="../../assets/images/mainTemplate/headerImg.png" width="839" height="183" border="0" /></a></div>
</div>
<div id="sidebar">
<div id="navigation">
<!-- menu script itself. you should not modify this file -->
<script type="text/javascript" language="JavaScript" src="../../scripts/navMenu.js"></script>
<!-- items structure. menu hierarchy and links are stored there -->
<script type="text/javascript" language="JavaScript" src="../../scripts/navMenu_items.js"></script>
<script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu_items.js"></script>
<script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu2_items.js"></script>
<script type="text/javascript" language="JavaScript" src="../../scripts/storeMenu_items.js"></script>
<!-- files with geometry and styles structures -->
<script type="text/javascript" language="JavaScript" src="../../scripts/navMenu_tpl2.js"></script>
<script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu_tpl.js"></script>
<script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu2_tpl.js"></script>
<script type="text/javascript" language="JavaScript" src="../../scripts/storeMenu_tpl.js"></script>
<script type="text/javascript" language="javascript">
<!--//
// Make sure the menu initialization is right above the closing </body> tag
// Moving it inside other tags will not affect the position of the menu on
// the page. If you need this feature please consider Tigra Menu GOLD.
// each menu gets two parameters (see demo files)
// 1. items structure
// 2. geometry structure
new menu (MENU_ITEMS, MENU_TPL);
// If you don't see the menu then check JavaScript console of the browser for the error messages
// "Variable is not defined" error indicates that there's syntax error in that variable's definition
// or the file with that variable isn't properly linked to the HTML document
//-->
</script>
</div>
<div id="sbar-image3"> <a href="http://www.facebook.com/pages/International-Lightning-Class-Association/197584991571" target="_blank"><img src="../../assets/images/mainTemplate/facebook.png" alt="Facebook ILCA link" width="36" height="36" border="0" /></a> <a href="http://twitter.com/IntLightning" target="_blank"><img src="../../assets/images/mainTemplate/twitter.png" alt="Twitter ILCA link" width="36" height="36" border="0" /></a> Connect with us</span></span></span> <br />
</div>
<div id="sbarSearch">
<!-- SiteSearch Google -->
<FORM method=GET action="http://www.google.com/search">
<input type=hidden name=ie value=UTF-8>
<input type=hidden name=oe value=UTF-8>
<TABLE width="126" align="center" bgcolor="#FFFFFF">
<tr>
<td width="135"><img src="../../assets/images/mainTemplate/google.jpg" width="68" height="21" alt="Google logo" /></td>
</tr>
<tr>
<td><input type=text name=q size=20 maxlength=255 value="" />
<input type=submit name=btnG value="Google Search" />
<font size=-2>
<input type=hidden name=domains value="www.lightningclass.org">
<br>
<input type=radio
name=sitesearch value="">
Web
<input type=radio name=sitesearch value="www.lightningclass.org" checked>
Site<br>
</font></td>
</tr>
</TABLE>
</FORM>
<!-- SiteSearch Google -->
</div>
<div id="sbarTranslate">
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/translatemypage.xml&up _source_language=en&w=148&h=60&title=&border=&output=js"></script>
</div>
<div id="sbar-image1"><a href="http://www.guadalajara2011.org.mx/esp/01_inicio/index.asp"><img src="../../assets/images/mainTemplate/panAm.jpg" width="116" height="129" border="0" /></a></div>
<div id="sbar-image2"><a href="../../membership/joinRenew/membershipOptions.asp"><img src="../../assets/images/mainTemplate/joinILCA.png" alt="Join the ILCA" width="113" height="113" border="0" /></a></div>
</div>
<div id="background">
<div id="mainContent"> <!-- InstanceBeginEditable name="mainContent" -->
<div id="docHdr"> Header </div>
<div id="docBody">
<div id="listMe">
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="needavailadd">
<fieldset id="needavailAdd" name="needavailAdd">
<legend class="legend">Logistics-Add</legend>
<br />
<label for="naType">Request Type:</label>
<label>
<select name="naType" size="1" id="naType" tabindex="1">
<option value="Sel" <%If (Not isNull(" Select a request type")) Then If ("Sel" = CStr(" Select a request type")) Then Response.Write("selected=""selected""") : Response.Write("")%>> Select a request type</option>
<%
While (NOT rsneedavailReq.EOF)
%>
<option value="<%=(rsneedavailReq.Fields.Item("requestKey").Value)%>" <%If (Not isNull(" Select a request type")) Then If (CStr(rsneedavailReq.Fields.Item("requestKey").Value) = CStr(" Select a request type")) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rsneedavailReq.Fields.Item("requestType").Value)%></option>
<%
rsneedavailReq.MoveNext()
Wend
If (rsneedavailReq.CursorType > 0) Then
rsneedavailReq.MoveFirst
Else
rsneedavailReq.Requery
End If
%>
</select>
</label>
<br />
<br />
<label>First and Last Name:
<input name="memName" type="text" id="memName" tabindex="2" onblur="MM_validateForm('memName','','R');return document.MM_returnValue" />
</label>
<br />
<br />
<label>City:
<input name="city" type="text" id="city" tabindex="3" onblur="MM_validateForm('city','','R');return document.MM_returnValue" />
</label>
<label>State: </label>
<label>
<select name="state" size="1" id="state" tabindex="4" onchange="MM_validateForm('phone','','NisNum');MM_validateForm('email','','NisEmail');ret urn document.MM_returnValue">
<option value="Sel" <%If (Not isNull(" Select a state")) Then If ("Sel" = CStr(" Select a state")) Then Response.Write("selected=""selected""") : Response.Write("")%>> Select a state</option>
<%
While (NOT rsStates.EOF)
%>
<option value="<%=(rsStates.Fields.Item("stateCode").Value)%>" <%If (Not isNull(" Select a state")) Then If (CStr(rsStates.Fields.Item("stateCode").Value) = CStr(" Select a state")) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rsStates.Fields.Item("stateName").Value)%></option>
<%
rsStates.MoveNext()
Wend
If (rsStates.CursorType > 0) Then
rsStates.MoveFirst
Else
rsStates.Requery
End If
%>
</select>
</label>
<br />
<br />
<label>Telephone#:
<input type="text" name="phone" id="phone" tabindex="5" />
</label>
<br />
<br />
<label>Email:
<input name="email" type="text" id="email" tabindex="6" size="48" maxlength="48" />
</label>
<br />
<br />
<label>Additional Information:
<input name="info" type="text" id="info" tabindex="7" size="58" maxlength="255" />
</label>
<br />
<br />
<input type="submit" name="addButton" id="addButton" value="Add Me" tabindex="8" />
<input type="reset" name="reset" id="reset" value="Reset" />
</fieldset>
<input name="eventID" type="hidden" id="eventID" value="<%=Request.QueryString("ID")%>" />
<input type="hidden" name="MM_insert" value="needavailadd" />
</form>
</div>
<div id="nameList">
<table width=640 align=left>
<% if rsneedAvail.EOF then
response.write "<strong>No Requests Yet</strong>"
else
response.write "<strong>" & (rsneedAvail_total) & "</strong>"
response.write "<strong> Logistics Requests:</strong>"%>
<p align="left"> </p>
<% icat = rsneedAvail.Fields.Item("requestType").Value %>
<tr>
<td colspan='2' class="eventMonths"><%=(rsneedAvail.Fields.Item("requestType").Value)%></td>
</tr>
<tr>
<td colspan='2'><hr width=250% align="center"/></td>
</tr>
<%rsneedAvail.Requery%>
<% While ((Repeat1__numRows <> 0) AND (NOT rsneedAvail.EOF)) %>
<% If rsneedAvail.Fields.Item("requestType").Value <> icat then
icat = rsneedAvail.Fields.Item("requestType").Value%>
<tr height="20">
<td colspan='2'></td>
</tr>
<tr>
<td colspan='2' class="eventMonths"><%=(rsneedAvail.Fields.Item("requestType").Value)%></td>
</tr>
<tr>
<td colspan='2'><hr width=250% align="center"/></td>
</tr>
<%End If %>
<tr>
<td width="165"><%=(rsneedAvail.Fields.Item("name").Value)%></td>
<td width="150"><%=(rsneedAvail.Fields.Item("location").Value)%></td>
<td width="100"><%=(rsneedAvail.Fields.Item("phone").Value)%></td>
<td width="265"><%=(rsneedAvail.Fields.Item("info").Value)%></td>
<td width="30" class="hpResults" aligm="left"><div align="center"><a href="eventneedavailUpdate.asp?ID=<%=(rsneedAvail.Fields.Item("recID").Value)%>"><span class="eventeditLink">Edit</span></a></div></td>
<td width="30" class="hpResults" aligm="left"><div align="center"><a href="eventupdateLogin.asp?ID=<%=(rsneedAvail.Fields.Item("recID").Value)%>"><span class="eventeditLink">Delete</span></a></div></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsneedAvail.MoveNext()
Wend
end if
%>
</table>
</div>
</div>
<!-- InstanceEndEditable --></div>
</div>
<div id="clear"></div>
<div id="footer">
<p><u><a href="../../membership/joinRenew/membershipOptions.asp" class="ftrLinks">Membership</a></u> | <u><a href="eventSelect.asp" class="ftrLinks">Racing</a></u> | <u><a href="../../classRules/documents/ilcaBylaws.asp" class="ftrLinks">Class Rules</a></u> | <u><a href="../../photoGallery/photos2008/index.asp" class="ftrLinks">Photo Gallery</a></u> | <u class="ftrLinks"><a href="../../marketplace/store/index.asp">Marketplace</a></u> | <u><a href="../../contacts/index.asp" class="ftrLinks">Contacts</a></u> | <u class="ftrLinks"><a href="../../siteMap.asp">Site Map</a></u><br />
All Rights Reserved—International Lightning Class Association<br />
<u><a href="mailto:[email protected]" class="ftrLinks">[email protected]</a></u><br />
1528 Big Bass Drive, Tarpon Springs, Florida 34689— Phone: 727-942-7969 — Fax: 727-942-0173 — Skype: ilcaoffice</p>
</div>
</div>
</body>
<!-- InstanceEnd -->
</html>
<%
rsStates.Close()
Set rsStates = Nothing
%>
<%
rsneedavailReq.Close()
Set rsneedavailReq = Nothing
%>
<%
rsneedAvail.Close()
Set rsneedAvail = Nothing
%>
Entries may be updated. After the update, the page above is displayed. Sometimes the updated information displays, but more often it does not (????). I have tried a requery, but that is not working. How do I requery the recordset so that the current information always displays?
Update page:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/ilcaData.asp" -->
<!--#include file="../../Connections/eventCalendar.asp" -->
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
If (CStr(Request("MM_update")) = "needavailUpdate") Then
If (Not MM_abortEdit) Then
' execute the update
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_eventCalendar_STRING
MM_editCmd.CommandText = "UPDATE needAvail SET naType = ?, memName = ?, city = ?, [state] = ?, phone = ?, email = ?, info = ? WHERE recID = ?"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 3, Request.Form("naType")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 32, Request.Form("memName")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 18, Request.Form("city")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 2, Request.Form("state")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 12, Request.Form("phone")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202, 1, 48, Request.Form("email")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 202, 1, 75, Request.Form("info")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 5, 1, -1, MM_IIF(Request.Form("MM_recordId"), Request.Form("MM_recordId"), null)) ' adDouble
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "eventneedavail.asp?ID=" & Request.Form("eventID")
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl
Else
MM_editRedirectUrl = MM_editRedirectUrl
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%>
<%
Dim rsStates
Dim rsStates_cmd
Dim rsStates_numRows
Set rsStates_cmd = Server.CreateObject ("ADODB.Command")
rsStates_cmd.ActiveConnection = MM_ilcaData_STRING
rsStates_cmd.CommandText = "SELECT * FROM stateCodes"
rsStates_cmd.Prepared = true
Set rsStates = rsStates_cmd.Execute
rsStates_numRows = 0
%>
<%
Dim rsneedavailReq
Dim rsneedavailReq_cmd
Dim rsneedavailReq_numRows
Set rsneedavailReq_cmd = Server.CreateObject ("ADODB.Command")
rsneedavailReq_cmd.ActiveConnection = MM_eventCalendar_STRING
rsneedavailReq_cmd.CommandText = "SELECT * FROM needavailReq"
rsneedavailReq_cmd.Prepared = true
Set rsneedavailReq = rsneedavailReq_cmd.Execute
rsneedavailReq_numRows = 0
%>
<%
Dim rsneedAvail__MMColParam
rsneedAvail__MMColParam = "0"
If (Request.QueryString("ID") <> "") Then
rsneedAvail__MMColParam = Request.QueryString("ID")
End If
%>
<%
Dim rsneedAvail
Dim rsneedAvail_cmd
Dim rsneedAvail_numRows
Set rsneedAvail_cmd = Server.CreateObject ("ADODB.Command")
rsneedAvail_cmd.ActiveConnection = MM_eventCalendar_STRING
rsneedAvail_cmd.CommandText = "SELECT * FROM needAvail WHERE recID = ?"
rsneedAvail_cmd.Prepared = true
rsneedAvail_cmd.Parameters.Append rsneedAvail_cmd.CreateParameter("param1", 5, 1, -1, rsneedAvail__MMColParam) ' adDouble
Set rsneedAvail = rsneedAvail_cmd.Execute
rsneedAvail_numRows = 0
%>
<%
Dim MM_paramName
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth
Dim MM_removeList
Dim MM_item
Dim MM_nextItem
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then
MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "") Then
MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/mainLayout.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Welcome to the International Lightning Class</title>
<meta name="Keywords" content="Lightning, lightning sailboat, lightning class, international lightning class, lightning class sailboat, lightning class association" />
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="../../assets/favicon.ico" rel="shortcut icon" />
<link href="../../css/mainLayout2.css" rel="stylesheet" type="text/css" />
<link href="../../css/navMenu.css" rel="stylesheet" type="text/css" />
<link href="../../css/ilcaStyles.css" rel="stylesheet" type="text/css" />
<link href="../../css/document.css" rel="stylesheet" type="text/css" />
<script src="../../scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<!-- InstanceBeginEditable name="styles" -->
<link href="../../css/needAvail.css" rel="stylesheet" type="text/css" />
<!-- InstanceEndEditable -->
<!-- InstanceParam name="setdatetype" type="text" value="" -->
<!-- InstanceParam name="cleanup" type="text" value="" -->
</head>
<body onload="" onunload="">
<%
Response.Buffer = True
If (Request.ServerVariables("HTTPS") = "on") Then
Dim xredir__, xqstr__
xredir__ = "http://" & Request.ServerVariables("SERVER_NAME") & _
Request.ServerVariables("SCRIPT_NAME")
xqstr__ = Request.ServerVariables("QUERY_STRING")
if xqstr__ <> "" Then xredir__ = xredir__ & "?" & xqstr__
Response.redirect xredir__
End if
%>
<div id="wrapper">
<div id="header">
<div id="hdrLink"><a href="../../index.asp"><img src="../../assets/images/mainTemplate/headerImg.png" width="839" height="183" border="0" /></a></div>
</div>
<div id="sidebar">
<div id="navigation">
<!-- menu script itself. you should not modify this file -->
<script type="text/javascript" language="JavaScript" src="../../scripts/navMenu.js"></script>
<!-- items structure. menu hierarchy and links are stored there -->
<script type="text/javascript" language="JavaScript" src="../../scripts/navMenu_items.js"></script>
<script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu_items.js"></script>
<script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu2_items.js"></script>
<script type="text/javascript" language="JavaScript" src="../../scripts/storeMenu_items.js"></script>
<!-- files with geometry and styles structures -->
<script type="text/javascript" language="JavaScript" src="../../scripts/navMenu_tpl2.js"></script>
<script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu_tpl.js"></script>
<script type="text/javascript" language="JavaScript" src="../../scripts/boatgrantMenu2_tpl.js"></script>
<script type="text/javascript" language="JavaScript" src="../../scripts/storeMenu_tpl.js"></script>
<script type="text/javascript" language="javascript">
<!--//
// Make sure the menu initialization is right above the closing </body> tag
// Moving it inside other tags will not affect the position of the menu on
// the page. If you need this feature please consider Tigra Menu GOLD.
// each menu gets two parameters (see demo files)
// 1. items structure
// 2. geometry structure
new menu (MENU_ITEMS, MENU_TPL);
// If you don't see the menu then check JavaScript console of the browser for the error messages
// "Variable is not defined" error indicates that there's syntax error in that variable's definition
// or the file with that variable isn't properly linked to the HTML document
//-->
</script>
</div>
<div id="sbar-image3"> <a href="http://www.facebook.com/pages/International-Lightning-Class-Association/197584991571" target="_blank"><img src="../../assets/images/mainTemplate/facebook.png" alt="Facebook ILCA link" width="36" height="36" border="0" /></a> <a href="http://twitter.com/IntLightning" target="_blank"><img src="../../assets/images/mainTemplate/twitter.png" alt="Twitter ILCA link" width="36" height="36" border="0" /></a>
Connect with us</span></span></span>
<br />
</div>
<div id="sbarSearch">
<!-- SiteSearch Google -->
<FORM method=GET action="http://www.google.com/search">
<input type=hidden name=ie value=UTF-8>
<input type=hidden name=oe value=UTF-8>
<TABLE width="126" align="center" bgcolor="#FFFFFF"><tr><td width="135"><img src="../../assets/images/mainTemplate/google.jpg" width="68" height="21" alt="Google logo" />
</td></tr>
<tr>
<td><input type=text name=q size=20 maxlength=255 value="" />
<input type=submit name=btnG value="Google Search" />
<font size=-2>
<input type=hidden name=domains value="www.lightningclass.org"><br><input type=radio
name=sitesearch value=""> Web
<input type=radio name=sitesearch value="www.lightningclass.org" checked>
Site<br>
</font>
</td></tr></TABLE>
</FORM>
<!-- SiteSearch Google -->
</div>
<div id="sbarTranslate">
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/translatemypage.xml&up _source_language=en&w=148&h=60&title=&border=&output=js"></script>
</div>
<div id="sbar-image1"><a href="http://www.guadalajara2011.org.mx/esp/01_inicio/index.asp"><img src="../../assets/images/mainTemplate/panAm.jpg" width="116" height="129" border="0" /></a></div>
<div id="sbar-image2"><a href="../../membership/joinRenew/membershipOptions.asp"><img src="../../assets/images/mainTemplate/joinILCA.png" alt="Join the ILCA" width="113" height="113" border="0" /></a></div>
</div>
<div id="background">
<div id="mainContent"> <!-- InstanceBeginEditable name="mainContent" -->
<div id="docHdr"> Header </div>
<div id="docBody">
<div id="listMe">
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="needavailUpdate">
<fieldset id="needavailUpdate" name="needavailUpdate">
<legend class="legend">Need/Available</legend>
<br />
<label for="naType">Request Type:</label>
<label>
<select name="naType" id="naType" tabindex="1">
<option value="" <%If (Not isNull((rsneedAvail.Fields.Item("naType").Value))) Then If ("" = CStr((rsneedAvail.Fields.Item("naType").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>></option>
<%
While (NOT rsneedavailReq.EOF)
%>
<option value="<%=(rsneedavailReq.Fields.Item("requestKey").Value)%>" <%If (Not isNull((rsneedAvail.Fields.Item("naType").Value))) Then If (CStr(rsneedavailReq.Fields.Item("requestKey").Value) = CStr((rsneedAvail.Fields.Item("naType").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rsneedavailReq.Fields.Item("requestType").Value)%></option>
<%
rsneedavailReq.MoveNext()
Wend
If (rsneedavailReq.CursorType > 0) Then
rsneedavailReq.MoveFirst
Else
rsneedavailReq.Requery
End If
%>
</select>
</label>
<br />
<br />
<label>First and Last Name:
<input name="memName" type="text" id="memName" tabindex="2" value="<%=(rsneedAvail.Fields.Item("memName").Value)%>" />
</label>
<br />
<br />
<label>City:
<input name="city" type="text" id="city" tabindex="3" value="<%=(rsneedAvail.Fields.Item("city").Value)%>" />
</label>
<label>State: </label>
<label>
<select name="state" id="state" tabindex="4">
<option value="" <%If (Not isNull((rsneedAvail.Fields.Item("state").Value))) Then If ("" = CStr((rsneedAvail.Fields.Item("state").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>></option>
<%
While (NOT rsStates.EOF)
%>
<option value="<%=(rsStates.Fields.Item("stateCode").Value)%>" <%If (Not isNull((rsneedAvail.Fields.Item("state").Value))) Then If (CStr(rsStates.Fields.Item("stateCode").Value) = CStr((rsneedAvail.Fields.Item("state").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(rsStates.Fields.Item("stateName").Value)%></option>
<%
rsStates.MoveNext()
Wend
If (rsStates.CursorType > 0) Then
rsStates.MoveFirst
Else
rsStates.Requery
End If
%>
</select>
</label>
<br />
<br />
<label>Telephone#:
<input name="phone" type="text" id="phone" tabindex="5" value="<%=(rsneedAvail.Fields.Item("phone").Value)%>" />
</label>
<br />
<br />
<label>Email:
<input name="email" type="text" id="email" tabindex="6" value="<%=(rsneedAvail.Fields.Item("email").Value)%>" size="48" maxlength="48" />
</label>
<br />
<br />
<label>Additional Information:
<input name="info" type="text" id="info" tabindex="7" value="<%=(rsneedAvail.Fields.Item("info").Value)%>" size="58" maxlength="255" />
</label>
<br />
<br />
<input type="submit" name="addButton" id="addButton" value="Update Me" tabindex="5" />
<input type="reset" name="reset" id="reset" value="Reset" />
</fieldset>
<input type="hidden" name="MM_update" value="needavailUpdate" />
<input type="hidden" name="MM_recordId" value="<%= rsneedAvail.Fields.Item("recID").Value %>" />
<input type="hidden" name="eventID" value="<%= rsneedAvail.Fields.Item("eventID").Value %>" />
</form>
</div>
</div>
<!-- InstanceEndEditable --></div>
</div>
<div id="clear"></div>
<div id="footer">
<p><u><a href="../../membership/joinRenew/membershipOptions.asp" class="ftrLinks">Membership</a></u> | <u><a href="eventSelect.asp" class="ftrLinks">Racing</a></u> | <u><a href="../../classRules/documents/ilcaBylaws.asp" class="ftrLinks">Class Rules</a></u> | <u><a href="../../photoGallery/photos2008/index.asp" class="ftrLinks">Photo Gallery</a></u> | <u class="ftrLinks"><a href="../../marketplace/store/index.asp">Marketplace</a></u> | <u><a href="../../contacts/index.asp" class="ftrLinks">Contacts</a></u> | <u class="ftrLinks"><a href="../../siteMap.asp">Site Map</a></u><br />
All Rights Reserved—International Lightning Class Association<br />
<u><a href="mailto:[email protected]" class="ftrLinks">[email protected]</a></u><br />
1528 Big Bass Drive, Tarpon Springs, Florida 34689— Phone: 727-942-7969 — Fax: 727-942-0173 — Skype: ilcaoffice</p>
</div>
</div>
</body>
<!-- InstanceEnd --></html>
<%
rsStates.Close()
Set rsStates = Nothing
%>
<%
rsneedavailReq.Close()
Set rsneedavailReq = Nothing
%>
<%
rsneedAvail.Close()
Set rsneedAvail = Nothing
%>Thank you for your attention and diligence. I know it was overwhelming. I've uploaded my new pages and found that they seem to be working as designed - whereas they weren't working totally correctly on localhost. I believe I'm good for now. If I run into more problems, I'll find a simpler way to present the problem. Thank you, again.
-
Problems ActiveX-Internet Explorer
Please Help-I am pulling my hair out and not getting anywhere
fast !!
I am developing a website and have created a swf flash movie
and have embedded on my home page, I would like it to play
automatically on page load.. It plays just fine in Firefox, but
does not play automatically on page load in Internet Explorer 6 and
7 (have to allow ActiveX content first). I have scoured the
internet and tried lots of javascript fixes for this issue, inc.
the fixes on the Adobe site-none of them have worked for me.
I have pasted my HTML for the home page-with the movie file
already embedded (Dreamweaver) and would be most grateful if anyone
out there can advise me where to put the javascript code etc so
that the movie plays when the page is opened.
Many thanks.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
<title>Welcome to William Farr C. E. Comprehensive
School</title>
<link href="stylesheet.css" rel="stylesheet"
type="text/css" />
</head>
<body>
<div id="wrapper">
<div id="header">
<h1>William Farr C. E. Comprehensive School</h1>
</div>
<div id="banner"></div>
<div id="navcontainer">
<ul id="navlist">
<li id="active"><a href="#"
id="current">Home</a></li>
<li><a href="#">Governing
Body</a></li>
<li><a href="#">Friends</a></li>
<li><a href="#">Links</a></li>
<li><a href="#">Vacancies</a></li>
<li><a href="#">Contact</a></li>
</ul></div>
<div id="leftnav">
<ul>
<li>
About Us</li>
<li>News</li>
<li>Calendar</li>
<li>Information</li>
<li>Gallery </li>
</ul>
</div>
<div id="content">
<p><span style="float:right;padding-top:0px;
padding-bottom: 7px; padding-left: 10px; padding-right
0px;"><img src=Images/head.jpg " width="132" height="184"
style="border:1px #999999;" /></span>William Farr is a
highly successful comprehensive school. We are proud of our
national reputation for the highest standards of achievement and
commitment to excellence in every aspect of education.
Within an environment of change and innovation we develop
traditional values of hard work, self discipline, responsibility
and healthy competition.
Our students are given every opportunity to grow and
develop, in a safe and healthy environment. It is a great pleasure
to know that the students at William Farr school not only get a
great education but that they grow into self sufficient learners
who have a clear purpose and a desire to do well in life. It is our
aim that all individuals will be part of a stimulating community in
which they can find security, tolerance and inspiration.
We look forward to joining you in a partnership to ensure
success and achievement at every level of your child's
ability.</p>
<p>P. Strong,<br />
Headteacher.</p>
</div>
<div id="rightnav">
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="174" height="174" title="Our School">
<param name="movie" value="wfs.swf" />
<param name="quality" value="high" />
<embed src="wfs.swf" quality="high" pluginspage="
http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="174"
height="174"></embed>
</object>
</div>
<div id="footer">
<p>Home | Governing Body | Friends | Links | Vacancies
| Contact | About Us | News | Calendar | Information |
Gallery</p></div>
<div id="legal"><p>© William Farr
School 2007</p></div>
</div>
</body>
</html>Question: Are you previewing your site from your local
machine? If so, the IE issue happens to me as well, and it's just a
security issue with allowing certain content off of local files.
However, if you upload your site and files to a server, you
shouldn't receive that message for allowing ActiveX content. I had
the same happen to my site when I previewed the site from my local
machine before uploading it to the server.
Hope it helps!
- AH -
I hope someone can help with this. I'm trying to create a
dynamic site using dreamweaver CS3, with php5 and mysql5 in the
background but I'm having difficulty with recordsets disappearing
from the server behaviour menu when tweaking the code to allow set
characters or set names for utf8.
For a while, I've been having a problem getting my
dynamically generated master list pages (eg lists of jobs) to
display international characters like an accented french e (and
other languages) and for these to display correctly when viewed in
phpmyadmin also. So, I've placed headers at the top of the page for
utf8 and created the content metatag for utf8 in the page code.
Where needed I've added ENT_QUOTES utf etc for htmlentities and
added accept-charset utf-8 in the <form> action area.
(one thing I haven't done in the form action area is add
<enctype="multipart/form-data">, but I'm not sure if this
will make any difference)
In the backend, the innoDB database is collated and built
using utf8_unicode_ci. I'm on a shared host -so can't directly
access php.ini or adjust the connection settings through
phpmyadmin. But I can write .htaccess files (currently with the
defaultcharset set to utf8 also).
At this point - all list pages display the correct characters
when retrieved from the database - indicating that the headers are
working. But - in phpmyadmin the letters are garbled, and garbled
on return on update forms (content management). I solved this by
adding the &#xxxx; equivalents in insert and update forms to
display the text correctly on the list pages - but again it's not
convenient to see all of this in phpmyadmin, as I'd like to be able
to read it there as it should be, and to dispense with the need to
add &#xxxx references on the insert and update forms.
So...a bit of searching, and I read that in order for the
international characters to display in phpmyadmin correctly, I
needed to amend my php page code so that for all instances where I
see the connection to the database, before the SELECT, INSERT and
DELETE queries, I need to add either mysql_set_charset('utf8',
$connection) or use three lines of code referencing mysql_query SET
NAMES, SET CHARACTER SET and SET COLLATION_CONNECTION for utf8.
I did that, and it removed all of my recordsets in the
sidebar menu! Not too good. I'm left with a task of rebuilding
pages now.
So I placed the mysql_set_charset line in the connection.php
file in the DW Connections folder below the connection there
instead. [I didn't precede the mysql etc line with a $ sign - I
wonder if that's the issue?]
With this change I could use the Insert forms to add the
international characters directly into the database and see through
phpmyadmin that all was hunky dory. But then the problems came with
first loads of the master list page.
So, I can get international characters into the database now
(which is a step in the right direction for me), using an insert
form on the website, but I still can't get the international
characters to display on the returned page on first loading eg on a
list of jobs. Note that the detail pages display fine when clicking
the master links, and when I return from the detail page back to
the master list - the characters are ok. They just don't seem to
display when the master page loads for the first time which is
really perplexing me.
I suspect that I need to add the mysql_set_charset line below
the $connection and before the selects, inserts etc at all
instances on the webpage, but this just removes the recordset from
the menu, so this doesn't seem to be a good option.
Can anyone point me in the right direction as I'm been stuck
on this for ages. It may be something simple like adding $ in front
of the mysql_query, but then again maybe not.
I've tried other forums - but people seem to be content with
viewing but not offering assistance. I don't believe that what I'm
doing here hasn't been done before....all I want is for my pages to
display international characters and for these to display correctly
in phpmyadmin so that when I insert, update and delete records
using webforms I don't have to resort to using &#xxx inserts.
Help please!.oO(08Green)
> So...a bit of searching, and I read that in order for
the international
>characters to display in phpmyadmin correctly, I needed
to amend my php page
>code so that for all instances where I see the connection
to the database,
>before the SELECT, INSERT and DELETE queries, I need to
add either
>mysql_set_charset('utf8', $connection) or use three lines
of code referencing
>mysql_query SET NAMES, SET CHARACTER SET and SET
COLLATION_CONNECTION for utf8.
Usually you only need to send a SET NAMES 'utf8' right after
the
connection to the DB has been established. That way all data
that is
transferred between the DB and your script will be handled as
UTF-8.
> I did that, and it removed all of my recordsets in the
sidebar menu! Not too
>good. I'm left with a task of rebuilding pages now.
>
> So I placed the mysql_set_charset line in the
connection.php file in the DW
>Connections folder below the connection there instead. [I
didn't precede the
>mysql etc line with a $ sign - I wonder if that's the
issue?]
I've never used mysql_set_charset().
Here in my applications it always works like this:
* the default charset in my InnoDB tables is ISO-8859-1, I
only use
UTF-8 in the columns that really need it (text data, but not
INT or
DATE columns)
* SET NAMES 'utf8' at the beginning
* all files (HTML and PHP) are encoded as UTF-8 without BOM
* all pages delivered as UTF-8 (my pages are
script-generated, so I use
an appropriate header() call to define the content-type and
encoding)
That's it. Oh, and I don't use phpMyAdmin ...
> With this change I could use the Insert forms to add the
international
>characters directly into the database and see through
phpmyadmin that all was
>hunky dory. But then the problems came with first loads
of the master list
>page.
In the first part of your posting it sounded as if it worked
almost
correctly, before you tried to fix the broken phpMyAdmin
appearance.
Is that correct?
> So, I can get international characters into the database
now (which is a step
>in the right direction for me), using an insert form on
the website, but I
>still can't get the international characters to display
on the returned page on
>first loading eg on a list of jobs.
They did display correctly first, didn't they? So it seems
that you
broke your script just in order to fix some PMA problem.
Revert that.
Make your script work for normal input/output from/to a
website first
and don't worry about PMA for now.
What do you need PMA for BTW? It may have many other issues
as well and
should only be used if really necessary or if you're not
familiar with
the command line interface. The only thing that we are using
it is to
get a dump from a remote DB, where I don't have shell access
to call
mysqldump directly (yes, I could also write a little PHP
script for
that, it's already somewhere on my TODO). But here on my
local system I
always use the MySQL command prompt if I have to directly
work on some
tables or to import the dump from remote.
Anyway, if you need PMA, your might try their group or forum.
I'm sure
there's an FAQ as well. Maybe it's just a configuration
issue.
> I've tried other forums - but people seem to be content
with viewing but not
>offering assistance. I don't believe that what I'm doing
here hasn't been done
>before....all I want is for my pages to display
international characters and
>for these to display correctly in phpmyadmin so that when
I insert, update and
>delete records using webforms I don't have to resort to
using &#xxx inserts.
The bug here is PMA itself. ;-)
Micha -
I want to add record to database from labview thanks to ActiveX
I want to know how I can access to records which are in a field of a table of My database ACCESS ???
I've begun to open a database with an ActiveX, then I've opened a recordset, but I don't know how I can access to records of any field...
Could someone help me ???
Thanks in advance
hasna
PS: I send you my VI and I have no database toolkit and I work with labview5.
Attachments:
écriture_de_la_base.vi 37 KBFind attached example. It was converted from 6 to 5. Therefore, let me know if it's not working and I'll post a screen capture of its block diagram. The example replaces the last entry in one table containing one string column.
Hope this helps
Attachments:
Editdatabase_Me.vi 50 KB
MyExample.mdb 74 KB -
Hoping one of you mySQL gurus can help me with a bit of a pickle.
I have two tables:
1: Dogs
2: Litters
What I need to do is pull the male and female dog from the list of dogs.
Example in brief form:
Table One (Litters)
litters_id
litters_male
litters_female
Table two (Dogs)
parent_id
parent_name
parent_picture
parent_notes
etc ....
My input form would have two drop down fields listing the dogs ..
Male: (Dropdown Menu 1)
Famale (Dropdown Menu 2)
Each of these drops successfully put the parent_id value into the litters_male and litters_female respectively.
What I need to do is to display on a page from the litters recordest the dog names and other info related to each dog within the same recordset.
So I need to write a JOIN to join both the litters_male and litters_female to the parent_id field.
Is this possible?
Thanks in advance
BradMaybe if you see the actuall data structure ... ?
CREATE TABLE `litters` (
`litter_id` tinyint(3) NOT NULL auto_increment,
`litter_breed` tinyint(2) default NULL,
`litter_male` tinyint(3) default NULL,
`litter_female` tinyint(3) default NULL,
`litter_bred` varchar(32) collate latin1_german2_ci default NULL,
`litter_due` varchar(32) collate latin1_german2_ci default NULL,
`litter_notes` varchar(255) collate latin1_german2_ci default NULL,
PRIMARY KEY (`litter_id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci AUTO_INCREMENT=5 ;
-- Dumping data for table `litters`
INSERT INTO `litters` VALUES (1, 1, 11, 9, 'December 4, 2009', 'February 5, 2010', '');
INSERT INTO `litters` VALUES (2, 1, 12, 7, 'January 2010', 'March 2010', '');
INSERT INTO `litters` VALUES (3, 1, 12, 5, 'January 2010', 'March 2010', '');
INSERT INTO `litters` VALUES (4, 2, 1, 2, 'January 2010', 'March 2010', '');
-- Table structure for table `parents`
CREATE TABLE `parents` (
`parents_id` tinyint(3) NOT NULL auto_increment,
`parents_name` varchar(32) collate latin1_german2_ci default NULL,
`parents_sex` varchar(10) collate latin1_german2_ci default NULL,
`parents_breed` tinyint(2) default NULL,
`parents_notes` text collate latin1_german2_ci,
`parents_picture` varchar(64) collate latin1_german2_ci default NULL,
`parents_thumb` varchar(64) collate latin1_german2_ci default NULL,
PRIMARY KEY (`parents_id`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci COMMENT='parent profiles' AUTO_INCREMENT=19 ;
-- Dumping data for table `parents`
INSERT INTO `parents` VALUES (1, 'Kremlin', 'Male', 2, '<p><span class="bodytext"><p>Where do I start...Kremlin has got to be one of the most georgeous Dogue De Bordeaux''s you will ever lay eyes on!  He has the pedigree to match as well!!  Kremlin is 2 years old, was born at Riverbend Bordeaux Kennel in Kettle Falls Washington.  Thanks you so much Jody for allowing us to make him part of our family as well as the foundation of our breeding program.  We are extremely lucky!! </p> <p>Kremlin''s father was the famous Champion Riverbend''s Beefsteak.  He weighed 166 pounds of solid male Dogue De Bordeaux!  He is also world famous for his offspring producing many champions.  Beefsteak''s father was Champion Beefy T. Bad Boy.  Kremlin''s mother is Ella Van De Paterhoek who came straight from the world famous Van De Paterhoek Kennel in Belgium!  She was out of their most famous breeding pair International Champion Emberez Apollo and Bintje De Paterhoek.  His mother is also full sister to Champion Dillen Van De Paterhoek, Champion Effje Van De Paterhoek and the famous Champion Enferno Van De Paterhoek!!</p></span></p>', 'kremlin.jpg', NULL);
INSERT INTO `parents` VALUES (2, 'Sako', 'Female', 2, '<p><span class="bodytext">Sako is a Dogue De Bordeaux a.k.a French Mastiff.  She was born in Washington on December 8, 2008.  She has a very impressive background!! <br></span></p>', 'sako.jpg', NULL);
INSERT INTO `parents` VALUES (3, 'Anna Belle', 'Female', 1, '<p>"The Paw Palace Anna Supreme"<br><br> Anna is a beautiful and outstanding black and tan merle female! She was born in Louisiana on September 7, 2007. She weighs 4 lbs. Anna is a loving, playful and beautiful little girl with a very soft and vivid colored coat! <br><br>Anna is AKC and CKC registered!!</p>', 'annabelle.jpg', NULL);
INSERT INTO `parents` VALUES (4, 'Daisy', 'Female', 1, '<p>"Oneway Back From Iraq"<br><br> Daisy is white with cream colored markings. She was born in Wisconsin on July 27, 2006 . Daisy has the coby style body and weighs approx. 6 lbs. She is small but stocky! She also has a perfect little apple head and very loving personality! Daisy likes to mother and has taken on the responsibility of mothering all my other chi''s! <br><br> Daisy is Akc and CKC registered.<br><br>ONEWAY BACK FROM IRAQ Champions include<br><br>(4 generation): CH MT View''s Lil'' General</p>', 'daisy.jpg', NULL);
INSERT INTO `parents` VALUES (5, 'Journey', 'Female', 1, '<p><span class="bodytext"><p style="text-align: left;">"Journey Reins Supreme"</p> <p style="text-align: left;">This little sweetie comes to us from Missouri, She is AKC and CKC Registered.  Her Father is AKC Champion Rebound Black Russian.  He has 47 Champions out of 62 in his 5 generation pedigree!!!  Amazing!!  Her Mother is Davishall Lamars Wild Rose and almost every dog in her pedigree is Davishall bred so she is mostly stong Davishall foundation bloodlines.  She should be show quality and should turn out to be a dream!!! ...</p></span></p>', 'journey.jpg', NULL);
INSERT INTO `parents` VALUES (7, 'Oakie', 'Female', 1, '<p><span class="bodytext"><p style="text-align: left;"><em>"Felina''s Oakie Supreme"</em></p> <p style="text-align: left;">Oakie is a blue and tan female. Her Birthday is January 16, 2007 and she was born in Oklahoma. She is approx 8 lbs, she looks irredescant in the sun! She is a short coat and has the cutest little deerhead. She is so laid back and easy going, loves letting the pups chew on her!</p> <p style="text-align: left;">She is AKC and CKC registered. </p></span></p>', 'oakie.jpg', NULL);
INSERT INTO `parents` VALUES (8, 'Tikka', 'Female', 2, '<p><span class="bodytext">Tikka is our newest addition...thanks again to Jody of Riverbend Bordeaux for this georgeous girl!! She was born July 8,2009 in Washington. Her mother is Mitzi and her father is Kid. Kid''s mother is Junior Champion Amy and his father is Champion/Junior Champion Debonaire. They are from Kennel Z Orisku from the Czech Republic.  </span></p>', 'tikka.jpg', NULL);
INSERT INTO `parents` VALUES (9, 'Wistie', 'Female', 1, '', 'wistie.jpg', NULL);
INSERT INTO `parents` VALUES (10, 'Chico', 'Male', 1, '', 'chico.jpg', NULL);
INSERT INTO `parents` VALUES (11, 'Timber', 'Male', 1, '<p><span class="bodytext"><p style="text-align: left;">"Journey''s Supreme Tiny Timber Wolf"</p> <p style="text-align: left;">This tiny little man comes from Missouri and is AKC and CKC Registered! His Father is AKC Champion Rebound Black Russian.He has 47 Champions out of 62 in his 5 generation pedigree!!! Amazing!! His Mother is Ka-Lynn''s Pixie Dust at Lamar and has 5 champions out of 14 in her 3 generation pedigree.  He is super TINY and should do a tremendous job as our next stud!!</p></span></p>', 'timber.jpg', NULL);
INSERT INTO `parents` VALUES (12, 'Yogi', 'Male', 1, '<p style="text-align: left;"><em>"JK Littlesbugs Yogi Nobody Did Nothin"</em><strong><span class="bodytext"> </span></strong><span class="bodytext"><p style="text-align: left;">We at Supreme Chihuahua proudly present to you our newest addition Yogi! He was born in Pennsylvania on June 18, 2006, and later moved to Orlando, Florida. From there he came to make his permanent home here with us at Supreme Chihuahua! We consider ourselves very fortunate to have aquired this beautiful and tiny one of a kind extreme applehead chihuahua stud! Yogi is a 2 lb 6 oz teeny tiny blue fawn with white markings.<span style="font-style: italic;"> </span><em>He has 55 CHAMPIONS in his 6 generation pedigree...WOW!! </em>We are very excited to see what he will produce here at Supreme Chihuahua...I know his pups will be tiny and awesome! You will have a hard time finding these perfect qualities anywhere else!</p><p style="text-align: left;">Yogi is AKC and CKC registered.</p><p style="text-align: left;"></p><p style="text-align: left;"><em>JK LITTLESBUGS YOGI NOBODY DID NOTHIN</em></p> <p style="text-align: left;"></p><p style="text-align: left;"><em>CHAMPIONS INCLUDE (4 GENERATION):</em></p> <p style="text-align: left;"></p><p style="text-align: left;"><em>CH Ostreet Twenty-Four Seven</em><br><em>CH Cam''s Buttontop Beau</em><br><em>CH Durbin''s Atom</em><br><em>CH Davishall Black Bark O''BK</em></p> </span></p>', 'yogi.jpg', NULL); -
Add records in table ACCESS from labview by ActiveX
I try to add records in table of database ACCESS by an ActiveX from labview but my programme doesn't work ...
What is the problem ?
I have attached my VI
Thanks in advance
hasna
Attachments:
base1.vi 35 KBOn Thu, 11 Jul 2002 08:13:48 -0700 (PDT), Lab Viewer
wrote:
>I saw your previous posts related to ActiveX/Access. I once had the
>same kind of problems. It's not an easy task (without a toolkit)
>because you have to learn the "interface" provided by Access/DAO in
>order to manage what you are trying to do.
>In my case, the best solution it was to follow the Visual Basic for
>Applications examples included in MS Access. Even though you don't
>know VB, don't be afraid. Important is to figure out from that example
>what methods/properties you need to use, the proper order to call them
>and eventually some parameters. You are dealing with the same
>methods/properties in LabVIEW, the difference is that you have them in
>a graphical format instead of text
.You can find these examples by
>going to MS Access help > Index and type DAO objects and then choose
>one to start with (Database, recordset, field =85).
>
>Hope this helps
The examples on NI's website were originally written using the DAO
model, but the latest one was written using the ADO model.
However, I am unable to find either example LLBs on their website
anymore. Maybe they're trying to push their SQL Toolkit.
Along with the VBA help in MS Access, I *highly* recommend the book
ADO Programming for Dummies. Wonderful book. Helped me understand the
VBA help. :-)
Again, if anyone is intersted in VIs using ActiveX that works. He/she
is welcome to email me.
Linda -
I am having the same problem as user "Gabe the animator" in a post sent in 2007.
"my recordset that drives a dynamic table won't filter results based on a session variable. I know session variables are working because I have the session variable echo on the page (dragged-n-dropped my session variable from the Bindings panel to my page), and that works fine. So why can't I filter my recordset with the same session variable???"
here is the code:
<?php require_once('Connections/mockconn.php'); ?>
<?php
session_start();
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
if(!session_id()){
session_start();
$colname_info = "-1";
if (isset($_SESSION['email'])) {
$colname_info = $_SESSION['email'];
mysql_select_db($database_mockconn, $mockconn);
$query_info = sprintf("SELECT name, last_name, email, password FROM registration WHERE email = %s", GetSQLValueString($colname_info, "text"));
$info = mysql_query($query_info, $mockconn) or die(mysql_error());
$row_info = mysql_fetch_assoc($info);
$totalRows_info = mysql_num_rows($info);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>home</title>
</head>
<body>
<div id="info">hello <?php echo $row_info['']; ?></div>
<?php
if (isset($_SESSION['email'])) {
echo 'your email: '.' '. $_SESSION['email'] .' '.'good job';}
?>
</body>
</html>
PLEASE PLEASE HELP.... I have been at this for day's...
how do I get the record set to filter based on the value of the session variableSorry I forgot to mension the error I am getting?
( ! ) Notice: Undefined index: in C:\wamp\www\mock\home.php on line 59
Call Stack
Time
Memory
Function
Location
1
0.0093
389024
{main}( )
..\home.php:0
Why is this error coming up? -
Multi page recordset output from ASP page on Spry Tabbed Panel Widget
I am using a simple Spry Tabbed panel set on my asp page to show the output from different ASP pages, inside the tabbed panels. The tabbed panels on the page under consideration (destination page) display the output from different asp pages (source pages). The source asp pages generate multi page outputs which are paginated on the source page itself and pagination links are displayed on the source page itself.
However, we dont want to display the source page outside of the tabbed panel, but instead the output content from the source asp pages should show inside the tabbeed panels only. The first page generated by the source asp page displays correctly inside the tabbed panel. However, when the user clicks on the links for the next page generated by the source asp page, but which is being displayed inside the destination page tabbed panel, they dont display the next page inside the tabbed panel. Instead the source asp page displays the output outside the tabbed panel destination page.
Please advise on how to ensure that the user can page through the recordset generated by the source asp page by clicking on the pagination links at the bottom of the records, while ensuring that the output displays within the tabbed panels on the destination asp page.
I am enclosing the source code being used to generate the spry tabbed panel widget and also updating it with the output from the source asp page. In this case, the code given below is from the main page containing the widget and the source asp page is "sample.asp", which generates multi page output.
Please note that I am not too keen on using xml data sets output from the source asp page, but would be more comfortable with directly using the asp pages to fill the tabbed panel content.
Please help
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script language="javascript" src="/SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<script src="/SpryAssets/xpath.js" type="text/javascript"></script>
<script src="/SpryAssets/SpryData.js" type="text/javascript"></script>
<link href="/SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0" onclick="Spry.Utils.updateContent('two','sample.asp?page=' <%=i%>); Spry.Data.initRegions();" >Tab 1</li>
<li class="TabbedPanelsTab" tabindex="0">Tab 2</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div id=two class="TabbedPanelsContent">Content 1</div>
<div class="TabbedPanelsContent">Content 2</div>
</div>
</div>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
</script>
</body>I fully agree that the problem does not lie with tthe tabbed panels.
The solution would probably be first required to be tried using ajax on any div tab.
Then the same code would have to be used on Sprytabbed panel. Hence, the following may be advised:
1. Sample code for server side pagination and displaying inside any div tag and refreshing it using ajax. the update link would also lie inside the div tag which would show the next/ previous page without reloading the page.
2. Then adapting the refresh technique using ajax in the Spry Tabbed panel using the inbuilt updatecontent method of the Spry Tabbed panels.
In order to achieve the above, I am getting the recordset output in the tab content as expected. The recordset is also getting the pagination links from server side asp as required.
However, it is also generating the following error.
Webpage error details
Message: Unterminated string constant
Line: 9
Char: 56
Code: 0
URI: http://localhost/test/test5.asp
The sourcecode is as given below. If you can help with the error indicated above, my problem would probably get solved.
<html><head>
<title>Untitled Document</title>
<link href="/SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
<script src="/SpryAssets/SpryURLUtils.js" type="text/javascript"></script>
<script src="/SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<script src="/SpryAssets/SpryData.js" type="text/javascript"></script>
<script src="/SpryAssets/xPath.js" type="text/javascript"></script>
</head>
<body>
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0" onclick="Spry.Utils.updateContent('one','untitled-5.asp');">Tab 1</li>
<li class="TabbedPanelsTab" tabindex="0" >Tab 2</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div id=one class="TabbedPanelsContent">Content 1</div>
<div id ="two" class="TabbedPanelsContent">Content 2</div>
</div>
</div>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
</script>
</body>
</html> -
Is there a limit to the amount of recordsets that you can
have on one page?150 recordsets? You are out of your mind.
If what you posted is the complete page source, then there
are some real
issues here.
1. You SELECT *, but only display one column.
2. You only display the first record, ignoring all others
that may be
returned, and hold the entire set open until the end of the
page.
3. All but one of your table columns is guaranteed to be
blank, yet you
still take the time to add a div to center the non-existent
cell contents.
4. I can't imagine any sane database design that ends up with
a table named
"8th Jan 2007"
Please tell me this is just selected snippets from your
actual page...
What are you trying to do? Maybe it would be easier if we
just helped you
do it some other way. Especially if you're using gimpy
Access, which would
definitely balk at the number of connections you'd be holding
open to get
150 recordsets.
"l00pyl00" <[email protected]> wrote in
message
news:[email protected]...
>I have pages with 150 on, but they dont seem to work.
However pages with a
> couple on do. Heres my code any help would be very much
appreciated:
>
> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <!--#include file="Connections/bum.asp" -->
> <%
> Dim bc3mon1
> Dim bc3mon1_numRows
>
> Set bc3mon1 = Server.CreateObject("ADODB.Recordset")
> bc3mon1.ActiveConnection = MM_bum_STRING
> bc3mon1.Source = "SELECT * FROM [8th Jan 07] WHERE Room
='BC3' AND
> Day='Monday' AND Session='1'"
> bc3mon1.CursorType = 0
> bc3mon1.CursorLocation = 2
> bc3mon1.LockType = 1
> bc3mon1.Open()
>
> bc3mon1_numRows = 0
> %>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
> "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="
http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
> <title>bum</title>
> </head>
>
> <body bgcolor="#edda8e" text="#333333" link="#000000"
vlink="#000000"
> alink="#000000">
>
> <table width="88%" border="1" align="center">
> <tr>
> <td width="2%"> </td>
> <td width="21%"><div align="center">
Monday</div></td>
> <td width="27%"><div align="center">
Tuesday</div></td>
> <td width="18%"><div align="center">
Wednesday</div></td>
> <td width="17%"><div align="center">
Thursday</div></td>
> <td width="15%"><div align="center">
Friday</div></td>
> </tr>
> <tr>
> <td>
1</td>
> <td><div
>
align="center"><%=(bc3mon1.Fields.Item("STAFF").Value)%></div></td>
> <td><div
align="center"></div></td>
> <td><div
align="center"></div></td>
> <td><div
align="center"></div></td>
> <td><div
align="center"></div></td>
> </tr>
> </table>
> </body>
> </html>
>
> <%
> bc3mon1.Close()
> Set bc3mon1 = Nothing
> %>
>
> -
Inserting a Recordset Kills PHP Processing
In Dreamweaver 11.0 (CS5) on both MAMP and a live server, I am experiencing a puzzling issue.
Inserting any Recordset kills PHP processing. For example, this document works perfectly:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Untitled Document</title>
</head>
<body><?php echo “Hello, world.” ?><?php phpinfo() ?></body>
</html>
As soon as I add any Recordset to the page, those two php statements simply stop working. In fact, the Recordsets return no data on the page. After I delete the Recordset code that Dreamweaver had inserted, and restore the page, php statements magically begin working again!
(During the creation of the Recordset, the Test button confirms all columns are present, and the two rows are fine.)
Any clue to what’s going on?I've solved part of this issue. It turns out that Dreamweaver copies to the testing server all new files and changes to files EXCEPT... the Connections folder it creates and that folder's contents. The user needs to do that manually.
However, after I copied the Connections folder, Dreamweaver refuses to Insert any Data Object.
For example, it won't insert a Repeat Region or a Dynamic Table. When I select
Insert->Data Objects->Dynamic Data->Dynamic Table
Dreamweaver returns this error:
While executing insertObject in DynamicTable.htm, a JavaScript error occurred.
Ditto the Repeat Region.
Maybe you are looking for
-
Font usage in CS6 Premiere , Open and Closed quotes??
Hello I am trying to use open and closed quotes in CS6 Premiere, without any success. Using a Mac 10.8.5. When I try the alt shft [ and the shift [ it only uses one side of the quote. Any suggestions? Is this a software, settings or OS issue? Thank y
-
Sending an email in HTML format
in order to change the mail format from PDF to HTML format, first I create the smartform with the relevant content , secont I create a new class and implement the method with the code mentioned in the blog "sending HTML Email from SAP CRM/ERP" and
-
Hi experts, We have a Business Intelligence (BW/BI) instance running, with also J2EE part installed. Now we would like to use the Web BEx , thus we first need to install the Enterprise Portal. My question is, what should be the preferable approach to
-
Use time capsule for iTunes library
I would like to use my new time capsule as the location for my iTunes library. How do I go about doing that? Currently my iTunes library is on my MacBook Pro.
-
Virtual console (Something usefull when Leopard hangs...)
I'm still looking for the possibility to enable virtual consoles on OSX, in order to rescue Leopard, when it becomes unresponsive, instead of hard shutdown the whole system (it happends quite often). Any tip? I googled and tried with /etc/ttys, but w