4 messaggi dal 07 settembre 2004
innanzitutto ciao a tutti, sono Jefe alias Claudio ..
mi sono iscritto a questo forum per sottoporvi questo problema:

sto tentando di creare un form per la compilazione di recensioni di gruppi musicali, è una struttura moduli/tabelle visionabile qua (user: test pass: test)

premettendo che non sono sicuro dell'esattezza del codice, al momento dell'invio dei dati compare questo messaggio d'errore: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

potete aiutarmi?
Modificato da Jefe il 07 settembre 2004 11.34 -
2.584 messaggi dal 14 maggio 2001
Prova a postare il codice...
4 messaggi dal 07 settembre 2004
<%@LANGUAGE = JScript%>
<!--#include file="connessione.asp"-->
<%
if (Session("username") == null)
{
Response.Write("ACCESSO NEGATO!");
Cn.Close();
Response.End;
}
var azione = new String(Request.QueryString("azione"))
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Documento senza titolo</title>
<style type="text/css">
<!--
.Stile1 {color: #FFFFFF}
.Stile3 {color: #FFFFFF; font-weight: bold; }
.Stile5 {
font-size: 10px;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
-->
</style></head>

<body>
<form method="post" action="recensioneform.asp?azione=InserisciFormrece">
<table width="100%" border="0">

<tr>
<th colspan="5" bgcolor="#000066" scope="col"><div align="left"><%if (azione == "undefined") {%><span class="Stile1">TITOLO ALBUM
<input name="album" type="text" value="-" size="50" maxlength="50">
</span></div></th>
</tr>
<tr>
<th width="18%" bgcolor="666666" scope="row"><span class="Stile1">nome gruppo </span></th>
<td width="16%" bgcolor="666666"><input type="text" name="band"></td>
<td width="28%" bgcolor="666666"><span class="Stile1"><strong>Artwork</strong></span></td>
<td colspan="2" bgcolor="666666"><span class="Stile3">tracklist</span></td>
</tr>
<tr>
<th scope="row">anno</th>
<td><select name="anno">
<option>1960</option>
<option>1961</option>
<option>1962</option>
<option>1963</option>
<option>1964</option>
<option>1965</option>
<option>1966</option>
<option>1967</option>
<option>1968</option>
<option>1969</option>
<option>1970</option>
<option>1971</option>
<option>1972</option>
<option>1973</option>
<option>1974</option>
<option>1975</option>
<option>1976</option>
<option>1977</option>
<option>1978</option>
<option>1979</option>
<option>1980</option>
<option>1981</option>
<option>1982</option>
<option>1983</option>
<option>1984</option>
<option>1985</option>
<option>1986</option>
<option>1987</option>
<option>1988</option>
<option>1989</option>
<option>1990</option>
<option>1991</option>
<option>1992</option>
<option>1993</option>
<option>1994</option>
<option>1995</option>
<option>1996</option>
<option>1997</option>
<option>1998</option>
<option>1999</option>
<option>2000</option>
<option>2001</option>
<option>2002</option>
<option>2003</option>
<option>2004</option>
<option>2005</option>
<option>2006</option>
<option>2007</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
</select></td>
<td rowspan="18"><p>
<input name="copertina" id="copertina" value="http://win.kernelband.com/public/" size="40">
<br>
(inserisci copertina: 200X200 pixel, formato GIF, nome: nomeband_nomealbum.gif)</a
></p>
</td>
<td width="17%" rowspan="18" align="left" valign="top"><textarea name="tracklist1" rows="15" wrap="PHYSICAL" id="tracklist1">-</textarea></td>
<td width="21%" rowspan="18" align="left" valign="top">-
<textarea name="tracklist2" rows="15" id="tracklist2">-</textarea></td>
</tr>
<tr>
<th scope="row">genere</th>
<td><select name="genere">
<option>Hard Rock</option>
<option>Prog Rock</option>
<option>Stoner Rock</option>
<option>Glam Rock</option>
<option>Glam Metal</option>
<option>Street Rock</option>
<option>Heavy Metal</option>
<option>NWOBHM</option>
<option>Thrash</option>
<option>Speed</option>
<option>Speed Thrash</option>
<option>Thrash Death</option>
<option>Death</option>
<option>Post Thrash</option>
<option>Black</option>
<option>Symphonic</option>
<option>Power Metal</option>
<option>Progressive</option>
<option>Epic</option>
<option>Guitar Virtuoso</option>
<option>Nu-Metal</option>
<option>Crossover</option>
</select></td>
</tr>
<tr>
<th scope="row">label</th>
<td><input name="label" type="text" value="-"></td>
</tr>
<tr>
<th scope="row">durata</th>
<td><select name="minuti">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
<option>32</option>
<option>33</option>
<option>34</option>
<option>35</option>
<option>36</option>
<option>37</option>
<option>38</option>
<option>39</option>
<option>40</option>
<option>41</option>
<option>42</option>
<option>43</option>
<option>44</option>
<option>45</option>
<option>46</option>
<option>47</option>
<option>48</option>
<option>49</option>
<option>50</option>
<option>51</option>
<option>52</option>
<option>53</option>
<option>54</option>
<option>55</option>
<option>56</option>
<option>57</option>
<option>58</option>
<option>59</option>
<option>60</option>
<option>61</option>
<option>62</option>
<option>63</option>
<option>64</option>
<option>65</option>
<option>66</option>
<option>67</option>
<option>68</option>
<option>69</option>
<option>70</option>
<option>71</option>
<option>72</option>
<option>73</option>
<option>74</option>
<option>75</option>
<option>76</option>
<option>77</option>
<option>78</option>
<option>79</option>
<option>80</option>
<option>81</option>
<option>82</option>
<option>83</option>
<option>84</option>
<option>85</option>
<option>86</option>
<option>87</option>
<option>88</option>
<option>89</option>
<option>90</option>
<option>91</option>
<option>92</option>
<option>93</option>
<option>94</option>
<option>95</option>
<option>96</option>
<option>97</option>
<option>98</option>
<option>99</option>
<option>100</option>
<option>101</option>
<option>102</option>
<option>103</option>
<option>104</option>
<option>105</option>
<option>106</option>
<option>107</option>
<option>108</option>
<option>109</option>
<option>110</option>
<option>111</option>
<option>112</option>
<option>113</option>
<option>114</option>
<option>115</option>
<option>116</option>
<option>117</option>
<option>118</option>
<option>119</option>
<option>120</option>
<option>121</option>
<option>122</option>
<option>123</option>
<option>124</option>
<option>125</option>
<option>126</option>
<option>127</option>
<option>128</option>
<option>129</option>
<option>130</option>
<option>131</option>
<option>132</option>
<option>133</option>
<option>134</option>
<option>135</option>
<option>136</option>
<option>137</option>
<option>138</option>
<option>139</option>
<option>140</option>
<option>141</option>
<option>142</option>
<option>143</option>
<option>144</option>
<option>145</option>
<option>146</option>
<option>147</option>
<option>148</option>
<option>149</option>
<option>150</option>
<option>151</option>
<option>152</option>
<option>153</option>
<option>154</option>
<option>155</option>
<option>156</option>
<option>157</option>
<option>158</option>
<option>159</option>
<option>160</option>
<option>161</option>
<option>162</option>
<option>163</option>
<option>164</option>
<option>165</option>
<option>166</option>
<option>167</option>
<option>168</option>
<option>169</option>
<option>170</option>
<option>171</option>
<option>172</option>
<option>173</option>
<option>174</option>
<option>175</option>
<option>176</option>
<option>177</option>
<option>178</option>
<option>179</option>
<option>180</option>
<option>181</option>
<option>182</option>
<option>183</option>
<option>184</option>
<option>185</option>
<option>186</option>
<option>187</option>
<option>188</option>
<option>189</option>
<option>190</option>
<option>191</option>
<option>192</option>
<option>193</option>
<option>194</option>
<option>195</option>
<option>196</option>
<option>197</option>
<option>198</option>
<option>199</option>
<option>200</option>
</select>
min
<select name="secondi">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
<option>32</option>
<option>33</option>
<option>34</option>
<option>35</option>
<option>36</option>
<option>37</option>
<option>38</option>
<option>39</option>
<option>40</option>
<option>41</option>
<option>42</option>
<option>43</option>
<option>44</option>
<option>45</option>
<option>46</option>
<option>47</option>
<option>48</option>
<option>49</option>
<option>50</option>
<option>51</option>
<option>52</option>
<option>53</option>
<option>54</option>
<option>55</option>
<option>56</option>
<option>57</option>
<option>58</option>
<option>59</option>
<option>60</option>
</select>
sec</td>
</tr>
<tr>
<th scope="row">formato</th>
<td><select name="formato">
<option>CD</option>
<option>CD Digipack</option>
<option>DVD</option>
<option>DVD Audio</option>
<option>EP</option>
<option>LP</option>
<option>MD</option>
<option>VHS</option>
<option>mp3</option>
</select></td>
</tr>
<tr>
<th scope="row">provenienza</th>
<td><input name="provenienza" type="text" value="-"></td>
</tr>
<tr>
<th scope="row">web</th>
<td><input name="web" type="text" value="-"></td>
</tr>
<tr>
<th bgcolor="666666" scope="row"><span class="Stile1">line up </span></th>
<td bgcolor="666666">&nbsp;</td>
</tr>
<tr>
<th scope="row"><select name="lineup1">
<option>&nbsp;</option>
<option>Vocals</option>
<option>Vocals, Guitars</option>
<option>Vocals, Bass</option>
<option>Vocals, Drums</option>
<option>Vocals, Keyboards</option>
<option>Vocals, Guitars, Bass, Drums</option>
<option>Guitars</option>
<option>Lead Guitars</option>
<option>Rhytmic Guitars</option>
<option>Bass</option>
<option>Drums</option>
<option>Percussions</option>
<option>Keyboards</option>
<option>Samplers</option>
<option>DJ</option>
<option>Harmonica</option>
<option>Tambourine</option>
</select></th>
<td><input type="text" name="nome1"></td>
</tr>
<tr>
<th scope="row"><select name="lineup1">
<option>&nbsp;</option>
<option>Vocals</option>
<option>Vocals, Guitars</option>
<option>Vocals, Bass</option>
<option>Vocals, Drums</option>
<option>Vocals, Keyboards</option>
<option>Vocals, Guitars, Bass, Drums</option>
<option>Guitars</option>
<option>Lead Guitars</option>
<option>Rhytmic Guitars</option>
<option>Bass</option>
<option>Drums</option>
<option>Percussions</option>
<option>Keyboards</option>
<option>Samplers</option>
<option>DJ</option>
<option>Harmonica</option>
<option>Tambourine</option>
</select></th>
<td><input type="text" name="nome2"></td>
</tr>
<tr>
<th scope="row"><select name="lineup1">
<option>&nbsp;</option>
<option>Vocals</option>
<option>Vocals, Guitars</option>
<option>Vocals, Bass</option>
<option>Vocals, Drums</option>
<option>Vocals, Keyboards</option>
<option>Vocals, Guitars, Bass, Drums</option>
<option>Guitars</option>
<option>Lead Guitars</option>
<option>Rhytmic Guitars</option>
<option>Bass</option>
<option>Drums</option>
<option>Percussions</option>
<option>Keyboards</option>
<option>Samplers</option>
<option>DJ</option>
<option>Harmonica</option>
<option>Tambourine</option>
</select></th>
<td><input type="text" name="nome3"></td>
</tr>
<tr>
<th scope="row"><select name="lineup1">
<option>&nbsp;</option>
<option>Vocals</option>
<option>Vocals, Guitars</option>
<option>Vocals, Bass</option>
<option>Vocals, Drums</option>
<option>Vocals, Keyboards</option>
<option>Vocals, Guitars, Bass, Drums</option>
<option>Guitars</option>
<option>Lead Guitars</option>
<option>Rhytmic Guitars</option>
<option>Bass</option>
<option>Drums</option>
<option>Percussions</option>
<option>Keyboards</option>
<option>Samplers</option>
<option>DJ</option>
<option>Harmonica</option>
<option>Tambourine</option>
</select></th>
<td><input type="text" name="nome4"></td>
</tr>
<tr>
<th scope="row"><select name="lineup1">
<option>&nbsp;</option>
<option>Vocals</option>
<option>Vocals, Guitars</option>
<option>Vocals, Bass</option>
<option>Vocals, Drums</option>
<option>Vocals, Keyboards</option>
<option>Vocals, Guitars, Bass, Drums</option>
<option>Guitars</option>
<option>Lead Guitars</option>
<option>Rhytmic Guitars</option>
<option>Bass</option>
<option>Drums</option>
<option>Percussions</option>
<option>Keyboards</option>
<option>Samplers</option>
<option>DJ</option>
<option>Harmonica</option>
<option>Tambourine</option>
</select></th>
<td><input type="text" name="nome5"></td>
</tr>
<tr>
<th scope="row"><select name="lineup1">
<option>&nbsp;</option>
<option>Vocals</option>
<option>Vocals, Guitars</option>
<option>Vocals, Bass</option>
<option>Vocals, Drums</option>
<option>Vocals, Keyboards</option>
<option>Vocals, Guitars, Bass, Drums</option>
<option>Guitars</option>
<option>Lead Guitars</option>
<option>Rhytmic Guitars</option>
<option>Bass</option>
<option>Drums</option>
<option>Percussions</option>
<option>Keyboards</option>
<option>Samplers</option>
<option>DJ</option>
<option>Harmonica</option>
<option>Tambourine</option>
</select></th>
<td><input type="text" name="nome6"></td>
</tr>
<tr>
<th scope="row"><select name="lineup1">
<option>&nbsp;</option>
<option>Vocals</option>
<option>Vocals, Guitars</option>
<option>Vocals, Bass</option>
<option>Vocals, Drums</option>
<option>Vocals, Keyboards</option>
<option>Vocals, Guitars, Bass, Drums</option>
<option>Guitars</option>
<option>Lead Guitars</option>
<option>Rhytmic Guitars</option>
<option>Bass</option>
<option>Drums</option>
<option>Percussions</option>
<option>Keyboards</option>
<option>Samplers</option>
<option>DJ</option>
<option>Harmonica</option>
<option>Tambourine</option>
</select></th>
<td><input type="text" name="nome7"></td>
</tr>
<tr>
<th scope="row"><select name="lineup1">
<option>&nbsp;</option>
<option>Vocals</option>
<option>Vocals, Guitars</option>
<option>Vocals, Bass</option>
<option>Vocals, Drums</option>
<option>Vocals, Keyboards</option>
<option>Vocals, Guitars, Bass, Drums</option>
<option>Guitars</option>
<option>Lead Guitars</option>
<option>Rhytmic Guitars</option>
<option>Bass</option>
<option>Drums</option>
<option>Percussions</option>
<option>Keyboards</option>
<option>Samplers</option>
<option>DJ</option>
<option>Harmonica</option>
<option>Tambourine</option>
</select></th>
<td><input type="text" name="nome8"></td>
</tr>
<tr>
<th scope="row"><select name="lineup1">
<option>&nbsp;</option>
<option>Vocals</option>
<option>Vocals, Guitars</option>
<option>Vocals, Bass</option>
<option>Vocals, Drums</option>
<option>Vocals, Keyboards</option>
<option>Vocals, Guitars, Bass, Drums</option>
<option>Guitars</option>
<option>Lead Guitars</option>
<option>Rhytmic Guitars</option>
<option>Bass</option>
<option>Drums</option>
<option>Percussions</option>
<option>Keyboards</option>
<option>Samplers</option>
<option>DJ</option>
<option>Harmonica</option>
<option>Tambourine</option>
</select></th>
<td><input type="text" name="nome9"></td>
</tr>
<tr>
<th scope="row"><select name="lineup1">
<option>&nbsp;</option>
<option>Vocals</option>
<option>Vocals, Guitars</option>
<option>Vocals, Bass</option>
<option>Vocals, Drums</option>
<option>Vocals, Keyboards</option>
<option>Vocals, Guitars, Bass, Drums</option>
<option>Guitars</option>
<option>Lead Guitars</option>
<option>Rhytmic Guitars</option>
<option>Bass</option>
<option>Drums</option>
<option>Percussions</option>
<option>Keyboards</option>
<option>Samplers</option>
<option>DJ</option>
<option>Harmonica</option>
<option>Tambourine</option>
</select></th>
<td><input type="text" name="nome10"></td>
</tr>
</table>
<p>
<textarea name="textarea" cols="90" rows="70" wrap="PHYSICAL">-</textarea>
</p>
<p>Voto
<select name="voto" id="voto">
<option>0</option>
<option>0,5</option>
<option>1</option>
<option>1,5</option>
<option>2</option>
<option>2,5</option>
<option>3</option>
<option>3,5</option>
<option>4</option>
<option>4,5</option>
<option>5</option>
<option>5,5</option>
<option>6</option>
<option>6,5</option>
<option>7</option>
<option>7,5</option>
<option>8</option>
<option>8,5</option>
<option>9</option>
<option>9,5</option>
<option>10</option>
</select>
Autore
<select name="autore" id="autore">
<option>Keifer</option>
<option>Tassadar</option>
<option>AmoN</option>
<option>Dave</option>
<option>Claudio &quot;El Jefe&quot;</option>
<option>Sabagod</option>
</select>
</p>
<p>
<input type="submit" name="Submit" value="Invia Dati">
</p>
<p>
<%
}
else if (azione == "InserisciFormrece")
{
var album = new String(Request.Form("album"));
var band = new String(Request.Form("band"));
var anno = new String(Request.Form("asnno"));
var genere = new String(Request.Form("genere"));
var label = new String(Request.Form("label"));
var minuti = new String(Request.Form("minuti"));
var secondi = new String(Request.Form("secondi"));
var formato = new String(Request.Form("formato"));
var web = new String(Request.Form("web"));
var lineup1 = new String(Request.Form("lineup1"));
var lineup2 = new String(Request.Form("lineup2"));
var lineup3 = new String(Request.Form("lineup3"));
var lineup4 = new String(Request.Form("lineup4"));
var lineup5 = new String(Request.Form("lineup5"));
var lineup6 = new String(Request.Form("lineup6"));
var lineup7 = new String(Request.Form("lineup7"));
var lineup8 = new String(Request.Form("lineup8"));
var lineup9 = new String(Request.Form("lineup9"));
var lineup10 = new String(Request.Form("lineup10"));
var nome1 = new String(Request.Form("nome1"));
var nome2 = new String(Request.Form("nome2"));
var nome3 = new String(Request.Form("nome3"));
var nome4 = new String(Request.Form("nome4"));
var nome5 = new String(Request.Form("nome5"));
var nome6 = new String(Request.Form("nome6"));
var nome7 = new String(Request.Form("nome7"));
var nome8 = new String(Request.Form("nome8"));
var nome9 = new String(Request.Form("nome9"));
var nome10 = new String(Request.Form("nome10"));
var copertina = new String(Request.Form("copertina"));
var tracklist1 = new String(Request.Form("tracklist1"));
var tracklist2 = new String(Request.Form("tracklist2"));
var testo = new String(Request.Form("testo"));
var voto = new String(Request.Form("voto"));
var autore = new String(Request.Form("autore"));

{
var Rs = new ActiveXObject("ADODB.Recordset");
Rs.Open("formrece",Cn,3,3);
Rs.AddNew();
Rs("album") = album;
Rs("band") = band;
Rs("genere") = genere;
Rs("label") = label;
Rs("minuti") = minuti;
Rs("secondi") = secondi;
Rs("formato") = formato;
Rs("web") = web;
Rs("lineup1") = lineup1;
Rs("lineup2") = lineup2;
Rs("lineup3") = lineup3;
Rs("lineup4") = lineup4;
Rs("lineup5") = lineup5;
Rs("lineup6") = lineup6;
Rs("lineup7") = lineup7;
Rs("lineup8") = lineup8;
Rs("lineup9") = lineup9;
Rs("lineup10") = lineup10;
Rs("nome1") = nome1;
Rs("nome2") = nome2;
Rs("nome3") = nome3;
Rs("nome4") = nome4;
Rs("nome5") = nome5;
Rs("nome6") = nome6;
Rs("nome7") = nome7;
Rs("nome8") = nome8;
Rs("nome9") = nome9;
Rs("nome10") = nome10;
Rs("copertina") = copertina;
Rs("tracklist1") = tracklist1;
Rs("tracklist2") = tracklist2;
Rs("testo") = testo;
Rs("voto") = voto;
Rs("autore") = autore;
Rs.Update();
Rs.Close();
Response.Write("<p align='center'>recensione inserita con successo!<br><a href='recensioneform.asp'>Nuova
</p>");
}
}
else
{
Cn.Close();
Response.Redirect("logout.asp");
}
%>

</p>
</form>
</body>
</html>
2.584 messaggi dal 14 maggio 2001
Ad occhio uno dei campi può essere nullo e quindi ti restituisce errore...
Come consiglio, per rendere più leggibile il codice, fai una pagina in cui inserisci nel database ed una in cuifai inserire i dati dall'utente
4 messaggi dal 07 settembre 2004
seoman ha scritto:
Ad occhio uno dei campi può essere nullo e quindi ti restituisce errore...
Come consiglio, per rendere più leggibile il codice, fai una pagina in cui inserisci nel database ed una in cuifai inserire i dati dall'utente



mi sa che non ho capito il da farsi ...
2.584 messaggi dal 14 maggio 2001
Adesso hai un'unica pagina su cui fai il submit passandoti la variabile "azione" che è valorizzata "undefined" quando l'utente vede i campi da valorizzare oppure "InserisciFormrece" nel caso in cui vuoi scrivere sul database...

Ti direi di fare una pagina in cui l'utente ha tutti i suoi campi da valorizzare e poi nell'action del tag form metti una pagina diversa in cui fai solo la scrittura sul database...

Verifica però che tutti i campi che scrivi sul db non siano nulli..

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.