Restore from SDF

Hello everybody
i am desperately asking if there is any way that i can restore sambapos from SDF file
please any help is appreciated i lost all work i have its just the SDF which i have now i got from my document
thank you

Likely no, compact SQL is garbage and this is precisely why. I hope you find a way but if you don’t or even if you do you should switch to full SQL server or Localdb SQL.

but even if i switch it i wont get my work back right? there is no way to convert the SDF to work ? :frowning:

This has details on converting from CE to SQL, try that but CE is rubbish and always reconmend propper SQL over CE every time.

Your other post shows errors on database so not sure if it will work - if its courupted then youll probably have dificulty.

the orthe post i deleted everything related to it after installing again it launches but the onlything i have is the SDF i will try this link and let you know thank you so much

not 100% but im sure i was able to import an SDF through management tools to an existing database… (Which obviously deleted everything ON that database)

Dont hold me to that though

You can not just import an SDF with management tools. You have to script it first which is in the tutorial listed above.

1 Like

Could you please tell me where can i download SQL Server Compact Toolbox tool?

Did you bother reading the tutorial;

It gives links

1 Like

He already posted on another thread stating its downloading, so guess he went back through it :slight_smile:

when i click it i find add in not .exe am trying to figure out how. my internet is weird today am still downloading the SQL express but again i dont know how to get the .exe and not the add in thats why i asked for help

@Kyrillos I locked your other topic. There is no reason to have two threads going for the same problem that will just lead to confusion and end up in forum members shying away from helping.

i Posted the first one because it was not launching. but after i deleted everything it launched but i lost all work.
i thought its another topic to ask if i can restore from SDF
sorry for the confusion which one should i delete?

NO need to delete anything I locked it for you just keep using this thread.

Awesome. thanks for the help the download is just completed i will follow the steps in your tutorial
and my apology for the confusion again

1 Like

its a little confusing i downloaded sql express but it dosent show me the server name like in this photo and when i click on the arrow it says browse for more

at the other hand my work is back i dont know how but again only the takeaway works
and thats the log
[Exception Info 1]

Top-level Exception
Type: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
Stack Trace: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at Samba.Presentation.App.Main()

Inner Exception 1
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Samba.Modules.PosModule
Stack Trace: at Samba.Modules.PosModule.PosViewModel.OnEntitySelectedForTicket(EventParameters1 eventParameters) at Microsoft.Practices.Prism.Events.EventSubscription1.InvokeAction(Action1 action, TPayload argument) at Microsoft.Practices.Prism.Events.EventSubscription1.<>c__DisplayClass2.b__0(Object[] arguments)
at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
at Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
at Samba.Presentation.Services.Common.ExtensionMethods.Publish[TEventsubject](TEventsubject eventArgs, String eventTopic, Action expectedAction)


[Assembly Info]

Samba.Services, Version=1.0.0.0
mscorlib, Version=4.0.0.0
System, Version=4.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
PresentationFramework, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
FluentValidation, Version=3.4.0.0
Samba.Domain, Version=1.0.0.0
DevExpress.Xpf.Grid.v14.1, Version=14.1.6.0
DevExpress.Xpf.Grid.v14.1.Core, Version=14.1.6.0
PresentationCore, Version=4.0.0.0
Stateless, Version=1.0.0.0
System.Core, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.6.0
EntityFramework, Version=4.4.0.0
System.Windows.Forms, Version=4.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Localization, Version=1.0.0.0
Microsoft.CSharp, Version=4.0.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
PropertyTools, Version=2012.4.14.1


server name is your computer name\instance name

Are you sure you have set up the SQL server yet?

yes i did thats why am confused. after i set it up my work is back its not lost that means it was saved somewhere inside the server database right?
i am deleting the entities now since only the restaurant is not launching and the take away does and i will tell u if it launches. if yes then no need to convert the SDF file right?

and now i see SDF file in my document did i set up the wrong server?

I dont understand? So it is working?

go through the tutorial 1 step at a time, its time consuming but worth it

i cant believe that. its working now again i retyped the tables again. i think its time to back it up to avoid any mistakes.
i just don’t understand what is the SDF files in my document since it has a stored database somewhere else? or i understand it wrong