Latest developer linksBookmark and Share
 
HomeThis WeekTop MonthTop AlltimeSearchRegisterFAQ
  
 
Submit Your Link
Please login to submit your Link
 

Does SqlCE 4.0 have it''s own provider? How do I know I''ve created a SqlCE 4.0 Database?

Posted: Jan/22/2011   By: nikhil   Points:15   Category: .NET  - ASP.Net    Views:153   Vote Up (0)   Vote Down (0)    

Hi folks,

If I wish to create a SqlCE 4.0 (sdf) database in my Visual Studio 2010 project, how can I confirm that the sdf is a CE4.0 file? Do I need a particular provider to connect to it? I've downloaded CE4.0 from MSDN, but I'm not sure if I'm using this right.

Can anyone make any suggestions?


-Pure Krome-

View Complete Post


Comments:
Be the first to comment this post.
 
Post Comment
Please login to post your comment
More Related Resources

How do I get the datakey for a DataControlRowType.DataRow when a TemplateField is created in code behind?

  

Hi, i'm new to this and I've been stuck for a while on this one.
I would like to retreive the data key (au_id) when the rowType = DataRow, so I can do a Sub query with the datakey Id. 

thank you for your help.

 

I'm using this Microsoft Example:

<%@ Page language="C#" %> <script runat="server">
 
  // Create a template class to represent a dynamic template column.
  public class GridViewTemplate : ITemplate
  {
    private DataControlRowType templateType;
    private string columnName;
  
    public GridViewTemplate(DataControlRowType type, string colname)
    {
      templateType = type;
      columnName = colname;
    }

    public void InstantiateIn(System.Web.UI.Control container)
    {
      // Create the content for the different row types.
      switch(templateType)
      {
        case DataControlRowType.Header:
          // Create the controls to put in the header
          // section and set their properties.
          Literal lc = new Literal();
          lc.Text = "<B>" + columnName + "</B>";
         
          // Add the controls to the Controls collection
          // of the container.
          container.Controls.Add(lc);
          break;
        case DataControlRowType.DataRow:

 

         //  GET au_id DataKey Here

 


          // Create the controls to put in a data row
          // section and set their properties.
          Label firstName = new Label();
          Label lastName = new Label();
         
          Literal spacer = new Literal();
          spacer.Text = " ";
         
          // To support data binding, register the event-handling methods
          // to perform the data binding. Each control needs its own event
          // handler.
          firstName.DataBinding += new EventHandler(this.FirstName_DataBinding);
          lastName.DataBinding += new EventHandler(this.LastName_DataBinding);
         
 &nb

Problem with OnClick event for a dynamically created RadioButton C#

  

Hello,

Im having problems with the onclick event. ive been trying to work out a solution for hours to no avail.

The radiobutton works just fine on firefox, but not on IE. Im using IE8.

I read it is a problem with IE because of GroupName not being defined when dynamically creating controls.

When i placed an alert command in the onclick event. i saw that the radiobutton is being selected. but after i close the alert message, the selection disappears.

Any help would be appreciated.

Thanks.


How to import existing database into Webmatrix?

  

I am planning to use Webmatrix as a testing arena for creating and completing the preparation of a website before publishing it. Working with websites on local computer should be much faster than doing that on an online server.

That is why I downloaded a database that I have already created on my online host account, and wanted to import it into webmatrix to continue building my new website using Webmatrix. Here, I did not know how to imort the DB I downloaded from my host, into webmatrix. There is seemingly no way to do that, or to import tables into an existing DB on webmatrix. 

Is that not possible? 

2- I tried to create a new DB on webmatrix which is a part of installing Wordbress on WM (new site from web gallery --> Wordpress), but I get this error :

The database 'xxxx' could not be created. ---> MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:3306


I have installed PHP 5.2 and Mysql on Webmatrix. 


Why does this happen?


how to open a database in a webmatrix C# file?

  

In the webMatrix examples, which I have working, it's very easy to access a database. Only three lines are necessary to get up and going:

@{ 
    var db = Database.Open("LOS");  
    var selectQueryString = "SELECT * FROM wknTest"; 
} 

and a little later,

 @foreach(var row in db.Query(selectQueryString)){  

There's no using's, no connection strings, all that happens behind the scenes. But now I have enough complicated c# code that I want to separate it into a separate C# file. How would I do the above, but in a C# file residing in the app_code folder in a webMatrix project? 

WebMatrix must be creating the Database object behind the scenes.  So I'm really asking how do I have access to that.


Webmatrix.Data.Database.Query() method return type

  

I'm using the Webmatrix.Data.Database.Query method to return a result set in the following form

var myResult = db.Query("Select * from mytable");

How do you cast myResult to get the count of records returned? I'd like to do something like

   myResult.Count


DD and the Membership Role Provider

  

Can the ASP.NET Membership role provider be used with a Dynamic Data site?
If so, how does one do this?

Thanks

Ken


Login Control with SQL Database

  

Hello,

I'm in a trouble with the Login Control of ASP.NET to check the credentials against an SQL Database.

I followed all the instructions from http://www.aspxcode.net/free-asp-net-login-source-code.aspx?Topics=How to Login With SQL Server Database but I have errors.

 

In a master page, I added a Login Control as follows:

<asp:LoginView ID="LoginView1" runat="server">
                <AnonymousTemplate>
                    <asp:Login ID="Login1" runat="server" OnAuthenticate="Login1_Authenticate" BorderPadding="0"
                        BorderStyle="None" BorderWidth="0px" EnableTheming="True" Font-Names="Arial"
                        Font-Size="X-Small" ForeColor="#333333" LoginButtonImageUrl="~/imgs/nav/en/Login.gif"
                        LoginButtonType="Image" TitleText="" TextLayout="TextOnTop" Width="120px" RememberMeText="Remember me.">
                        <CheckBoxStyle VerticalAlign="Middle" HorizontalAlign="Left" />
                        <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
                        <LabelStyle HorizontalAlign="Left" Width="130px" />
                        <LoginButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="None" Font-Names="Arial"
                            Font-Size="X-Small" ForeColor="#284775" CssClass="loginBox" />
                        <TextBoxStyle Font-Size="X-Small" Width="120px" />
                        <TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" Font-Size="X-Small" ForeColor="White" />
                    </asp:Login>               
                </AnonymousTemplate>
                <LoggedInTemplate>
                    <asp:LoginName ID="LoginName1" runat="server" /><br />
                    <asp:LoginStatus ID="LoginStatus1" runat="server" />
                </LoggedInTemplate>
                </asp:LoginView>

 

Also, I have implemented an internet found class to the project to connect, OnAuthenticate, to the SQL Database. The code is the following:

Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Configuration

Partial Class how_to_login_with_sql_server
    Inherits System.Web.UI.MasterPage

 &nb

Authentication cookie getting created on opening login page

  

Hi,

I am maintaining an application and when I open the Login page (NOT login), the Forms Authentication cookie gets created. I have checked in the Fiddler to confirm. On decrypting the cookie, it shows its an empty/junk cookie with values:

Name="-1"

IsAuthenticated= True


I have checked the code to see if there is any place where we are creating the cookie manually however could not find so. I have commented the code in the pageLoad event of the Login page and also the code for Application_AcquireRequestState, FormsAuthentication_OnAuthenticate, Application_AuthenticateRequest events in Global.asax file. But still the cookie gets created. 

The Web.Config entry for the Forms Authentication is:

<authentication mode="Forms">

<forms name="appNameAuth" path="/" loginUrl="~/Login.aspx" timeout="30" defaultUrl="~/Home.aspx" protection="Validation" slidingExpiration="true">

</forms>

</authentication>

<authorization>

<deny users="?" />

</authorization>


Please suggest what other setting can cause the Forms Auth cookie to get created even before the login.


Thanks for your help!

Regards,

Arjun

<authentication mode="Forms">
<forms name="appNameAuth" path="/" loginUrl="~/Login.aspx" timeout="30" defaultUrl="~/Home.aspx" protection="Validation" slidingExpiration="true">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>


When choosing POCO, First Model or the EDMX created from the database?

  

Good morning, this is my first post here.

I will make a system that will be sold at retail, placed in the clouds. The EDMX created from the database seemed the most natural choice since in reality the database exists and is already populated, it has a lot of data.

The First Model did not seem a natural solution since it is difficult today a completely new solution, and the examples I saw did not show me because I use it.

About POCO, what advantages do I have using it?

Thanks,

Bruno


Northwind database

  
I have to do an exercize where i am using Northwind sample database.  I am normally accustomed to linking to a database on another server.  Is there a way i can just include the Northwind database to my project.  In general, I need to find out how to link to the Northwind db so I can start querying and processing data.  thanks for your help
 
Categories:
.NET
Java
PHP
C/C++/VC++
HTML/XML
SAP
MainFrames
Data Warehousing
Testing
MySQL
SQL Server
Oracle
Javascript/VB Script
Others
Login
 
 
 
 
 Forgot password
 Contact Us   Terms Of use   Share your knowledge