HighDots Forums  

GOING INSANE! error: Could not use '(unknown)'; file already in use.

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss GOING INSANE! error: Could not use '(unknown)'; file already in use. in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
artane webforumsuser@macromedia.com
 
Posts: n/a

Default GOING INSANE! error: Could not use '(unknown)'; file already in use. - 07-13-2003 , 06:39 PM






Hi there,

All I want to do is insert a record into my access database. I get this error when I publish:

Could not use '(unknown)'; file already in use.
/corey/pages/sign in pages/TMP63nanhzi37.asp, line 50

I have two versions of this page. version 1 works, version 2 does not. The code is the exact same except for the database each page refers to. When I change the connection of version 1 to use the conection of version 2, version 1 works. The deal is, I can't see anything wrong with the database that I want version 1 to use!

All the security settings are the same. Each database has only one table. The only difference is version 1 has a much bigger table (about 20 columns). I don't think this has anything to do with it though.

Also. The name of the database that version 1 uses is Data.mdb". When I publish version 1 and get the above error, I return to dreamweaver and notice that within my site files, there is now another file called "Data.idb". It has an icon with a lock on it! What the hell is going on?

Here is a portion of the code for version 1 (the page that generates the above error when I publish it). I've added ****************** beside line 50.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<!--#include file="../../Connections/Data.asp" -->
<%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Redirect if username exists
MM_flag="MM_insert"
If (CStr(Request(MM_flag)) <> "") Then
MM_dupKeyRedirect="../username already exists.asp"
MM_rsKeyConnection=MM_Data_STRING
MM_dupKeyUsernameValue = CStr(Request.Form("username"))
MM_dupKeySQL="SELECT username FROM Coreydata WHERE username='" & MM_dupKeyUsernameValue & "'"
MM_adodbRecordset="ADODB.Recordset"
set MM_rsKey=Server.CreateObject(MM_adodbRecordset)
MM_rsKey.ActiveConnection=MM_rsKeyConnection ************************************
MM_rsKey.Source=MM_dupKeySQL
MM_rsKey.CursorType=0
MM_rsKey.CursorLocation=2
MM_rsKey.LockType=3
MM_rsKey.Open
If Not MM_rsKey.EOF Or Not MM_rsKey.BOF Then
' the username was found - can not add the requested username


I really hope you can help me understand this one. I've tried everything I can think of.

Thaks very much!

artane





Reply With Quote
  #2  
Old   
Showjumper
 
Posts: n/a

Default Re: GOING INSANE! error: Could not use '(unknown)'; file already in use. - 07-13-2003 , 06:43 PM






The ldb file is temp file access makes when the db is open. Do you have the
database open at the same time you are trying to do the insert?
"artane" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi there,

All I want to do is insert a record into my access database. I get this
error when I publish:

Could not use '(unknown)'; file already in use.
/corey/pages/sign in pages/TMP63nanhzi37.asp, line 50

I have two versions of this page. version 1 works, version 2 does not.
The code is the exact same except for the database each page refers to.
When I change the connection of version 1 to use the conection of version 2,
version 1 works. The deal is, I can't see anything wrong with the database
that I want version 1 to use!
Quote:
All the security settings are the same. Each database has only one table.
The only difference is version 1 has a much bigger table (about 20 columns).
I don't think this has anything to do with it though.
Quote:
Also. The name of the database that version 1 uses is Data.mdb". When I
publish version 1 and get the above error, I return to dreamweaver and
notice that within my site files, there is now another file called
"Data.idb". It has an icon with a lock on it! What the hell is going on?
Quote:
Here is a portion of the code for version 1 (the page that generates the
above error when I publish it). I've added ****************** beside line
50.
Quote:
%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%

!--#include file="../../Connections/Data.asp" --
%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%
%
' *** Redirect if username exists
MM_flag="MM_insert"
If (CStr(Request(MM_flag)) <> "") Then
MM_dupKeyRedirect="../username already exists.asp"
MM_rsKeyConnection=MM_Data_STRING
MM_dupKeyUsernameValue = CStr(Request.Form("username"))
MM_dupKeySQL="SELECT username FROM Coreydata WHERE username='" &
MM_dupKeyUsernameValue & "'"
MM_adodbRecordset="ADODB.Recordset"
set MM_rsKey=Server.CreateObject(MM_adodbRecordset)
MM_rsKey.ActiveConnection=MM_rsKeyConnection
************************************
MM_rsKey.Source=MM_dupKeySQL
MM_rsKey.CursorType=0
MM_rsKey.CursorLocation=2
MM_rsKey.LockType=3
MM_rsKey.Open
If Not MM_rsKey.EOF Or Not MM_rsKey.BOF Then
' the username was found - can not add the requested username


I really hope you can help me understand this one. I've tried everything
I can think of.

Thaks very much!

artane







Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.