天道酬勤,学无止境

sql-server-express

Connect Remotely to SQL Server Express instance hosted on Google Compute Engine

问题 我正在尝试访问安装在 Google Compute Engine VM 上的 Windows Server 2012 上的 SQL Server Express。 我已经为实例分配了静态 IP,并且还在 Windows 中为端口 1433 以及通过计算引擎的控制台区域添加了一个例外,并允许我的 IP 进行身份验证。 我尝试使用 SQL Server 身份验证通过 STATIC IP 和实例名称 ( IP\instancename ) 远程连接实例,我还将 SQL Server 配置为接受远程连接以及从配置区域启用 TCP/IP。 我仍然无法远程连接到实例,任何人都可以建议我该怎么做。

2022-05-11 01:21:03    分类:技术分享    sql-server-express   google-compute-engine

Run SQL script after start of SQL Server on docker

I have a Dockerfile with below code FROM microsoft/mssql-server-windows-express COPY ./create-db.sql . ENV ACCEPT_EULA=Y ENV sa_password=##$wo0RD! CMD sqlcmd -i create-db.sql and I can create image but when I run container with the image I don't see created database on the SQL Server because the script is executed before SQL Server was started. Can I do that the script will be execute after start the service with SQL Server?

2022-05-02 19:12:21    分类:问答    tsql   docker   dockerfile   sql-server-express

Access type mismatch on date field with SQL Server express backend

I have a simple access form with an unbound textbox that is used to search for records with a matching date, with the results displayed in a subform. The backend database is stored in an SQL Express 2008 instance, accessed via an ODBC connection (SQL Server Native Client 10.0). The client is Access 2007, running on 64 bit Windows 7 professional. When the user clicks on the search button on the form, the following VBA code is executed to update the subform. Private Sub UpdateSfmQuery() Dim query As String If IsDate(txtDate.Value) And IsNumeric(cboStaff.Value) Then query = "SELECT * FROM

2022-04-30 17:13:51    分类:问答    ms-access   sql-server-express   vba   date-format   type-mismatch

How to exclude first row in SQL Server 2005 Express

I want to exclude the first row from displaying from a SQL Server 2005 Express database... how do I do this? I know how to return just the top row, but how do I return all rows, except the top row

2022-04-28 00:59:13    分类:问答    .net   sql-server-express   sql-server-2005-express

Proper way to make a connection and query to a SQL Server Express database

I need a sample C# (console application) code witch connects to an SQL Server Express database and inserts a few variables into a table "laptops" SQL Server Express is @ localhost user name is database and password is testdatabase What is the proper way to do that ?

2022-04-26 18:42:33    分类:问答    c#   database   console   sql-server-express

Connect Remotely to SQL Server Express instance hosted on Google Compute Engine

I'm trying to access SQL Server Express installed on Windows Server 2012 on Google Compute Engine VM. I have assigned STATIC IP to the instance and also added an exception to the firewall in Windows for port 1433 as well as in via console area of Compute Engine and allowed my IP in authentication. I tried connecting the instance remotely via STATIC IP and Instance Name (IP\instancename) using SQL Server authentication, I have also configured SQL Server to accept remote connections as well as enabled TCP/IP from Configuration Area. I'm still unable to connect to the Instance remotely can any

2022-04-26 07:06:47    分类:问答    sql-server-express   google-compute-engine

Login failed for user '' and Cannot open database "Database1.mdf" requested by the login. The login failed. Login failed for user 'rBcollo-PC\rBcollo'

问题 所以..我几乎解决了我所有的问题。但现在我处理另一个问题。 我使用了这个连接字符串: SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;Database=Database1.mdf"); 它会引发下一个错误: 用户 ' 登录失败 如果我删除.mdf扩展名,它会引发相同的错误 现在,如果我将以下内容添加到字符串中: Integrated Security = true 它抛出这个: 无法打开登录请求的数据库“Database1.mdf”。 登录失败。 用户 'rBcollo-PC\rBcollo' 登录失败。 PS for Integrated Security = false 它抛出“用户登录失败” 问题是我没有为数据库使用任何用户名或密码。 请问有什么帮助吗? 回答1 注意:如果您将EntityFramework Core与SQL Server一起使用,我的回答将适用 此错误可能是由于“ Database does not exist ”和应用程序尝试执行数据库操作的原因。 在执行任何数据库操作之前,您需要使用以下行。 _context.Database.EnsureCreated(); 什么是EnsureCreated ? // Summary: // Ensures that the

2022-04-25 09:28:03    分类:技术分享    c#   sql-server   sql-server-express   localdb

Can't make a connection string in c#

问题 我是 C# 新手,不太了解! 我在 C# 2012 中创建了一个本地数据库,并希望与它建立连接。 我用它的向导测试了连接,它说成功连接到数据库。 所以我将连接字符串地址复制到我的代码中,但运行几秒钟后,我遇到了异常错误! 我不知道问题出在哪里! 这是我的代码: System.Data.SqlClient.SqlConnection myConnection; private void Form1_Load(object sender, EventArgs e) { myConnection = new System.Data.SqlClient.SqlConnection(); myConnection.ConnectionString = "Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\\Users\\jack\\Documents\\Visual Studio 2012\\Projects\\dictionary\\dictionary\\dictionaryDb.mdf;Integrated Security=True;Connect Timeout=30"; myConnection.Open(); MessageBox.Show("successfully connected!"); } 这是异常错误: 建立与

2022-04-24 23:42:34    分类:技术分享    c#   sql   sql-server   sql-server-express   sqlconnection

SQL Server 2012 doesn't install silently in Advanced Installer 11.4.1

问题 我的程序需要 SQL Server 2012 Express。 因此,我在基于功能的情况下添加了“Microsoft SQL Server 2012 Express”,您可以在此处看到: 我需要在没有任何向导安装的情况下在后台安装 SQL Server Express,因此我将这些参数添加到我的安装文件中: SQLEXPR_x64_ENU.exe /qs /ACTION=Install /FEATURES=SQLENGINE /INSTANCENAME=SQLEXPRESS /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM" /SQLSYSADMINACCOUNTS="Builtin\Administrators" /AGTSVCACCOUNT="NT AUTHORITY\Network Service" 我添加了这些参数来安装命令行文本框。 正如你在这里看到的: 但是当我构建项目并安装安装文件时,没有安装 SQL Server Express - 为什么? 最好的祝福 回答1

2022-04-22 07:34:08    分类:技术分享    installation   sql-server-express   silent-installer   advanced-installer