Connecitng to SQL Server Compact Edition

edited 10:25PM in FastReport .NET
Hi,

I am currrently evaluating FastReports.NET and can see myself buying a copy shortly but using the Demo Version I have downloaded I can not see any way of connecting to a SQL Server Compact Edition DB? (these are the DB's which are stored as actual file in a DIR).

I have connected fine to an Access DB but when I've tried SQL Server native and OLE DB Sql Server but both seem orientated to a SQL Server DB System running (for example what do you put as the Server Name? I tried the machine name).

With OLE DB it does hint at you being able to do this since it asks for a Filename at the very bottom but I tried the following with no joy:
- Server Name:<My Machine Name>
- Logon Details:I have tried NT Integrated Security and <My User Name> <Password>
- Attach a Database File as a database Name using Test for database Name and <My documents>\test.sdf as Filename (this is where the database is stored).

In all cases I get 'database does not exists or login failed'.
Can anyone point me in the right direction here or does FastReports not support Compact Edition? (in which case I'll switch back to using Access but rather would not).

Thanks in advance for your help.
Regards,
Dave.

Comments

  • edited 10:25PM
    Fast report supports the SQL Server Compact Edition DB. I'm successfully using it in one of our products.
    I filled a dataset with the data of the sdf file. In the designmode of visual studio right click on the report and choose select data source. Here you can add the datasets you want tos sse. After that simply design your report and go.
  • edited 10:25PM
    v2afrank wrote: »
    Fast report supports the SQL Server Compact Edition DB. I'm successfully using it in one of our products.
    I filled a dataset with the data of the sdf file. In the designmode of visual studio right click on the report and choose select data source. Here you can add the datasets you want tos sse. After that simply design your report and go.

    Hi,

    Thanks for the update - Hoped (Figured [img]style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />) it was probably me not understanding. I've created the DataSet called it TestDataSet - SQL DB File is Test.SDF with one Table Called Table1 and a Column in that Table called Column 1 (original eh?). Sorry if I'm being dense but when I go back into the Designer I've tried all the ways (e.g. Click Data, Add Data Source) I can see to insert a Data Source and they all take me back to the Connection Tab which seem to want a Server Name etc - I've tried OLE DB for SQL Server, Native SQL Server etc but can't seem to get to a point where I can attach a dataset (right clicking on form and selecting edit gives me 'no data sources avaliable'). My problem seems to be (to me at least) that I haven't established a link between the DB and the Report and that once that is done the datset will follow? Any further suggestions on where I am going wrong? Thanks again for all your help! Regards, Dave.[/img]
  • edited May 2011
    I don't know what you exactely forgotten, but I attached you a small project printing out the data of a sdf file. Maybe this will help you
  • edited 10:25PM
    v2afrank wrote: »
    I don't know what you exactely forgotten, but I attached you a small project printing out the data of a sdf file. Maybe this will help you

    Hi,

    Fully appreciate your help with this and this example hopefully will resolve my ignorance but unfortunatly there seems to be a problem with the ZIP File.
    Try opening it either directly off the Web or after downloading and I get 'Invalid File'; tried extracting all (after downloading) and get 'empty file'.

    Sorry to be a pain but can you try resending the ZIP again?, Many Thanks!.

    Regards,
    Dave.
  • edited 10:25PM
    Hm, I was able to open the file without problems.
    I compressed it new and attached the file. If you still have problems to open it, I suggest, that you upload a small test object. Maybe I can see what's the problem
  • edited 10:25PM
    v2afrank wrote: »
    Hm, I was able to open the file without problems.
    I compressed it new and attached the file. If you still have problems to open it, I suggest, that you upload a small test object. Maybe I can see what's the problem

    Hi,

    Yes very strange - I have been able to download both the original ZIP file and this one from my machine in work (Windows XP) but defintily was getting errors with the Original at home and will try your 2nd attempt also when I get back (unforutnaly I can't send the ZIP files to my home due to Email restrictions which don't allow ZIP files to be sent by email and Pen Drives are disabled on work machines).

    My home machine is running Windows Vista but another difference is that at home I only have the built-in Compressed Folders Technology whereas here I have winZip and winRAR so that may be the difference - If your 2nd download fails also I'll try getting hold of a copy of one of those.

    Thanks again for all your help - I will want to work through this issue but your help and encouragement plus the success I have had with Access DB's has convinced me FastReports is worth purchasing (so I think they owe you some commission [img]style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />). Regards, Dave.[/img]
  • edited 10:25PM
    DAST wrote: »
    DAST wrote: »
    Hm, I was able to open the file without problems.
    I compressed it new and attached the file. If you still have problems to open it, I suggest, that you upload a small test object. Maybe I can see what's the problem

    Hi,

    Yes very strange - I have been able to download both the original ZIP file and this one from my machine in work (Windows XP) but defintily was getting errors with the Original at home and will try your 2nd attempt also when I get back (unforutnaly I can't send the ZIP files to my home due to Email restrictions which don't allow ZIP files to be sent by email and Pen Drives are disabled on work machines).

    My home machine is running Windows Vista but another difference is that at home I only have the built-in Compressed Folders Technology whereas here I have winZip and winRAR so that may be the difference - If your 2nd download fails also I'll try getting hold of a copy of one of those.

    Thanks again for all your help - I will want to work through this issue but your help and encouragement plus the success I have had with Access DB's has convinced me FastReports is worth purchasing (so I think they owe you some commission [img]style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />). Regards, Dave.[/img]

    Well to quite the resounding success I was expecting but the issue was not having winRAR on my machine - Downloading that sorted the Archive issue out and I was able to use the Original Extract I downloaded to view your example so apologies for wasting your time there.

    Tried loading up your example and got Errors such as

    Warning 1 The primary reference "System.Windows.Forms.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "System.Windows.Forms.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" or retarget your application to a framework version which contains "System.Windows.Forms.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". WindowsFormsApplication1

    Not sure whether this is due to incompatable VStudio (e.g. you're on a different version) but also getting FastReport Errors such as

    Warning 5 The referenced component 'FastReport.Bars' could not be found.

    Although I can see the DLL's in the Program Files Directory [img]style_emoticons/<#EMO_DIR#>/dry.gif" style="vertical-align:middle" emoid="<_<" border="0" alt="dry.gif" /> Need to go away and work on these - Obviously some serious issues with my Machine. Regards, Dave.[/img]

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.