error when create new database sqlo express

User avatar
sal21
GoldLounger
Posts: 3220
Joined: 26 Apr 2010, 17:36

error when create new database sqlo express

Post by sal21 »

I have installed on my PC SQL EXPRESS 2008 without password.
Now i need to create a new database but have the error in image.
Please...
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 67238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: error when create new database sqlo express

Post by HansV »

Try starting SQL Server Management Studio by right-clicking it and selecting 'Run as administrator' ('Esegui come amministratore') from the context menu.
Regards,
Hans

User avatar
sal21
GoldLounger
Posts: 3220
Joined: 26 Apr 2010, 17:36

Re: error when create new database sqlo express

Post by sal21 »

HansV wrote:Try starting SQL Server Management Studio by right-clicking it and selecting 'Run as administrator' ('Esegui come amministratore') from the context menu.
tks!
Resolved.

I have sql express 2008 on my PC.
I need to share all database (with read and write permission) to the user of same LAN.
How to?

Note:
sorry but my first experinence on Sql Server

User avatar
HansV
Administrator
Posts: 67238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: error when create new database sqlo express

Post by HansV »

Regards,
Hans

User avatar
sal21
GoldLounger
Posts: 3220
Joined: 26 Apr 2010, 17:36

Re: error when create new database sqlo express

Post by sal21 »

:scratch:
The INSTANCE is mysql0002...
is ok?

But gogling .... i need to set enabled my firewall port 1433, or not?


to test this code work perfect in local, but have a dubt on Cursor type in connection and in recordset:

Code: Select all

Option Explicit
Sub ADO_ACCESS_To_SQLServer()

    Dim CN As ADODB.Connection
    Dim ServerName As String
    Dim DatabaseName As String
    Dim TableName As String
    Dim UserID As String
    Dim Password As String
    Dim RS As ADODB.recordSet
    Dim RIGA As Long

    Set RS = New ADODB.recordSet

    ServerName = "xxxxxxxxx\MYSQL0002"
    DatabaseName = "STAT_L0928"
    TableName = "STATISTICA_SPORT"
    UserID = ""
    Password = ""

    Set CN = New ADODB.Connection
    CN.CursorLocation = adUseServer
    CN.ConnectionTimeout = 99999

    CN.Open "Driver={SQL Server};Server=" & ServerName & ";Database=" & DatabaseName & _
            ";Uid=" & UserID & ";Pwd=" & Password & ";"

    RS.Open TableName, CN, adOpenKeyset, adLockOptimistic

    Do While Not RS.EOF
        RIGA = RIGA + 1
        RS.MoveNext
        DoEvents
    Loop

    RS.Close
    Set RS = Nothing
    CN.Close
    Set CN = Nothing

End Sub
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 67238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: error when create new database sqlo express

Post by HansV »

I'm not an expert on SQL Server; I hope that someone else can answer these questions.
Regards,
Hans

Fluffyone
NewLounger
Posts: 13
Joined: 17 Oct 2019, 06:54

Re: error when create new database sqlo express

Post by Fluffyone »

Run Microsft SQL Server Studio as an administrator, your problem will be solved