Your sharing! Your under arrest!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Bruce
    Indigo Rose Customer
    • Jun 2001
    • 2134

    Your sharing! Your under arrest!

    Does anyone know what this means??
    1014 ("A sharing violation occurred.")
  • AGRO
    Forum Member
    • Oct 2000
    • 818

    #2

    Comment

    • Bruce
      Indigo Rose Customer
      • Jun 2001
      • 2134

      #3
      Thanks Agro, I'll have to keep looking. :yes

      Comment

      • Intrigued
        Indigo Rose Customer
        • Dec 2003
        • 6138

        #4
        I want to take a stab-in-the-dark here...

        It's possible that the application is trying to manipulate a file that is already in use.

        Bruce, more insight into when this happens (in your code) and what is suppose to happen would help to shed light on this further.

        I.R. member(s)?
        Intrigued

        Comment

        • Bruce
          Indigo Rose Customer
          • Jun 2001
          • 2134

          #5
          Originally posted by Intrigued View Post
          I want to take a stab-in-the-dark here...

          It's possible that the application is trying to manipulate a file that is already in use.

          Bruce, more insight into when this happens (in your code) and what is suppose to happen would help to shed light on this further.

          I.R. member(s)?
          Yeah that would help huh? Sorry about that. It's fixed, I was placing code into functions that should not be there.

          Comment

          • Intrigued
            Indigo Rose Customer
            • Dec 2003
            • 6138

            #6
            That's good news for sure Bruce.

            :yes
            Intrigued

            Comment

            • Desrat
              Forum Member
              • Nov 2006
              • 240

              #7
              Im getting same problem as well sharing violation

              i have 1 global function

              Code:
              function appPathOriginal() 
              -- returns the original EXE's path ONLY (with trailing \)
               	-- this is useful for compressed single-file apps run from a CD
               	-- but, it also works with folder-based apps
               
               	local cdPath = ""; 
               	local findMarker = "SFXSOURCE:"; 
               	local cmdArgs = ""; 
               
               	if (Table.Count(_CommandLineArgs) > 0) then 
               		for i = 1, Table.Count(_CommandLineArgs) do 
               			if (String.Find(_CommandLineArgs[i], findMarker) > 0) then 
               				cmdArgs = _CommandLineArgs[i]; 
               				break; 
               			end 
               		end 
               	end 
               
               	if (cmdArgs ~= "") then 
               		if (String.Find(cmdArgs, findMarker) == 1) then 
               			local fullPath = String.Replace(cmdArgs, findMarker, "", true); 
               			local tblFullPath = String.SplitPath(fullPath); 
               			cd_Path = tblFullPath.Drive .. tblFullPath.Folder; 
               		end 
               	else 
               		cd_Path = _SourceFolder; 
               	end 
               	return cd_Path; 
               end
              and im getting the error on my startup actions

              Code:
              appPathOriginal()
              
              db1 = SQLite.Open(cd_Path .."\\AutoPlay\\Docs\\tdutradersmall.db");
              db2 = SQLite.Open(cd_Path .."\\AutoPlay\\Docs\\tdutrader.db");
              Any ideas? They app gives the sharing violation for db2 before it even gets to any more of my code.

              Ive tried replacing the db2, ive even copied and re-named tdutradersmall.db to tdutrader.db to ensure its not the file. It happens in preview as well as when built and Ive even run it on multiple sytems with the same error.

              Hope someone can help this is driving me nuts

              Comment

              • Desrat
                Forum Member
                • Nov 2006
                • 240

                #8
                ok solved it.

                I was running a File.GetCRC action after opening the databases and that caused it, moving the crc check to before opening and now it works fine.

                Comment

                Working...
                X