Hi,
I have a few questions:
1. When I try to MS Access Database Utilites > Compact and Repair, I get a
message:
You tried to open a database that is already open exclusively by user
'admin' on machine SSHAH.
Try again when the database is available.
2. Is there a limit to the number of users at a time that can insert a record into a database?
3. I have created a form with 42 values that are inserted into the Access DB
but on sumbmit I get this message:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Number of query values and
destination fields are not the same.
Here's my code:
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert") = "form1" Then
MM_editConnection = MM_login_STRING
MM_editTable = "quotes"
MM_editRedirectUrl = "confirm.asp"
MM_fieldsStr =
"o1|value|o26|value|o2|value|o27|value|o3|value|o28|value|o4|value|o29|value
|o5|value|o30|value|o6|value|o31|value|o7|value|o32|value|o8|value|o33|value
|o17|value|o9|value|o34|value|o10|value|o35|value|o11|value|o36|value|o12|va
lue|o37|value|o13|value|o38|value|o14|value|o39|value|o15|value|o40|value|o1
8|value|o20|value|username|value|o19|value"
MM_columnsStr =
"o1|',none,''|o26|none,none,NULL|o2|',none,''|o27|none,none,NULL|o3|',none,'
'|o28|none,none,NULL|o4|',none,''|o29|none,none,NULL|o5|',none,''|o30|none,n
one,NULL|o6|',none,''|o31|none,none,NULL|o7|',none,''|o32|none,none,NULL|o8|
',none,''|o33|none,none,NULL|o17|none,none,NULL|o9|',none,''|o34|none,none,N
ULL|o10|',none,''|o35|none,none,NULL|o11|',none,''|o36|none,none,NULL|o12|',
none,''|o37|none,none,NULL|o13|',none,''|o38|none,none,NULL|o14|',none,''|o3
9|none,none,NULL|o15|',none,''|o40|none,none,NULL|o18|none,none,NULL|o20|non
e,none,NULL|username|',none,''|o19|none,none,NULL"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|"
MM_columns = Split(MM_columnsStr, "|"
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "" Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
Request.QueryString <> "" Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
I have formatted my some of my requested variables:
value=<%= FormatCurrency( Request("o19" , 2, -2, -2, -2) %>
readonly="true">
but this should not be a problem should it?
I've checked and rechecked everything but can't seem to sort the problem -
has anyone seen this?
Regards,
Sanjay
I have a few questions:
1. When I try to MS Access Database Utilites > Compact and Repair, I get a
message:
You tried to open a database that is already open exclusively by user
'admin' on machine SSHAH.
Try again when the database is available.
2. Is there a limit to the number of users at a time that can insert a record into a database?
3. I have created a form with 42 values that are inserted into the Access DB
but on sumbmit I get this message:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Number of query values and
destination fields are not the same.
Here's my code:
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert") = "form1" Then
MM_editConnection = MM_login_STRING
MM_editTable = "quotes"
MM_editRedirectUrl = "confirm.asp"
MM_fieldsStr =
"o1|value|o26|value|o2|value|o27|value|o3|value|o28|value|o4|value|o29|value
|o5|value|o30|value|o6|value|o31|value|o7|value|o32|value|o8|value|o33|value
|o17|value|o9|value|o34|value|o10|value|o35|value|o11|value|o36|value|o12|va
lue|o37|value|o13|value|o38|value|o14|value|o39|value|o15|value|o40|value|o1
8|value|o20|value|username|value|o19|value"
MM_columnsStr =
"o1|',none,''|o26|none,none,NULL|o2|',none,''|o27|none,none,NULL|o3|',none,'
'|o28|none,none,NULL|o4|',none,''|o29|none,none,NULL|o5|',none,''|o30|none,n
one,NULL|o6|',none,''|o31|none,none,NULL|o7|',none,''|o32|none,none,NULL|o8|
',none,''|o33|none,none,NULL|o17|none,none,NULL|o9|',none,''|o34|none,none,N
ULL|o10|',none,''|o35|none,none,NULL|o11|',none,''|o36|none,none,NULL|o12|',
none,''|o37|none,none,NULL|o13|',none,''|o38|none,none,NULL|o14|',none,''|o3
9|none,none,NULL|o15|',none,''|o40|none,none,NULL|o18|none,none,NULL|o20|non
e,none,NULL|username|',none,''|o19|none,none,NULL"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|"
MM_columns = Split(MM_columnsStr, "|"
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "" Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And
Request.QueryString <> "" Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
I have formatted my some of my requested variables:
value=<%= FormatCurrency( Request("o19" , 2, -2, -2, -2) %>
readonly="true">
but this should not be a problem should it?
I've checked and rechecked everything but can't seem to sort the problem -
has anyone seen this?
Regards,
Sanjay