You must Sign In to post a response.
  • Category: Suggestions

    About error

    User does not have permission to perform this action.

    public DataTable reg3_disp()
    Line 45: {
    Line 46: con.Open();
    Line 47: cmd = new SqlCommand("select * from tbl_reg3",con);
    Line 48: da = new SqlDataAdapter(cmd);

    give the idea about these error....
  • #6952
    Maybe you used local variant AttachDbFilename it's will work in Visual Studio but not here.

    What connection string you're using?

    Show us how you are connecting. Is directory browsing enabled?

  • #6953
    I have attech the image about connection string.
    give me full information about directory browsing.

    Delete Attachment

  • #6954
    I think your connection string is correct . However, check the if you use password in the database
    or check the database file in local host
    try to reload the database again

  • #6955
    try the following connectinstring
    if u don't use password for your db

    add name="Database2ConnectionString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database12.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"

  • #6956
    You're using local variant AttachDbFilename that will work only with Visual Studio.
    If you want use your database with aspspider hosting
    try do next:
    Replace 'AttachDbFilename=|DataDirectory|\reg3.mdf'
    with 'Initial Catalog = YorUserID_reg3',
    I mean that must be Initial Catalog = YourUserID_yourDatabaseName

    YourUserID_yourDatabaseName search in Database Manager -> Express Manager ->
    column Database Name

  • Sign In to post your comments