Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
H

hezi

@hezi
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • SQL Server Express doesn't work
    H hezi

    Thank you Alaric. I tried it and it works. Now I would like to switch to SQL SERVER 2005 instead of SQL Server Express. How should I change the connection string? Thanks, Hezi

    ASP.NET database sql-server design sysadmin data-structures

  • SQL Server Express doesn't work
    H hezi

    I try to open the SQL Server Express database file "sample.mdf" but it doesn't work. Here is the code: -------------------------------------------------------------------------- using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; using System.Data.SqlClient; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //OleDb-ACCESS //-------------- //OleDbConnection con = new OleDbConnection(); //string comPath = Server.MapPath("~" + @"\") + @"app_Data\webTest.mdb"; //string coS = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + comPath; //SqlClient-SQL server express //------------------------------ System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection(); string comPath = Server.MapPath("~" + @"\") + @"app_Data\sample.mdf"; string coS = "Data Source=.\\SQLEXPRESS;AttachDbFilename=" + comPath + ";Integrated Security=True;User Instance=False;"; //OleDb-SQL server express //------------------------- //OleDbConnection con = new OleDbConnection(); //string comPath = Server.MapPath("~" + @"\") + @"app_Data\sample.mdf"; //string coS = "Provider=SQLOLEDB.1;" + "Data Source=" + comPath; con.ConnectionString = coS; con.Open(); } } -------------------------------------------------------------------------- 1. Code OleDb-ACCESS (commented) works OK. 2 . When I run the code in section: SqlClient-SQL Server express, I get error: Server Error in '/myWeb/trySqlServer' Application. -------------------------------------------------------------------------- CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file C:\MyPrograms\web\trySqlServer\app_Data\sample.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file

    ASP.NET database sql-server design sysadmin data-structures

  • onMouseOver handler does not get the argument
    H hezi

    I have a matrix of checkboxes and I would like to get the id on which the mouse is over. I set the onMouseOver handler programmatically by the following C# code in the Page_Load procedure: checkBoxObject.Atributes.Add("onMouseOver","mouseOverHandler(this)"); The client's MouseOverHandler function (JavaScript) is: Function mouseOverHandler(this) { alert(document.getElementById(me.id)) } When I move the mouse over a checkbox I get an empty alert box. It seems that the function "mouseOverHandler " does not get the firing checkbox in the argument"me". The same code works correctly when I change the triggering event from "onMouseOver" to "onClick". 1. Why does it work with "onClick" and dose not work with "onMouseOver" 2. How can I make it to work with "onMouseOver" Thank you Hezi

    .NET (Core and Framework) question csharp javascript
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups