Error when creating db on SQL-server 6.5 
Author Message
 Error when creating db on SQL-server 6.5

I run this code:

Dim db As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rstSQL As New ADODB.Recordset

(...)

    db.Open "driver={SQL Server};server=test;" & "uid=sa;pwd="
    db.Execute "CREATE DATABASE vb_test"

And I get the following error message:
Runtime Error message: "[Microsoft][ODBC SQL Server Driver][SQL Server]CREATE DATABASE: allocating 256 pages on disk 'master'"

What's wrong ???

Thanks in advance !!

Kenneth Solberg



Fri, 04 May 2001 03:00:00 GMT  
 Error when creating db on SQL-server 6.5

This is not an error, but merely an information message for your pleasure.

--
VB-Joker
MCSE

Please post all replies to newsgroup!


  I run this code:

  Dim db As New ADODB.Connection
  Dim cmd As New ADODB.Command
  Dim rstSQL As New ADODB.Recordset

  (...)

      db.Open "driver={SQL Server};server=test;" & "uid=sa;pwd="
      db.Execute "CREATE DATABASE vb_test"

  And I get the following error message:
  Runtime Error message: "[Microsoft][ODBC SQL Server Driver][SQL Server]CREATE DATABASE: allocating 256 pages on disk 'master'"

  What's wrong ???

  Thanks in advance !!

  Kenneth Solberg



Fri, 04 May 2001 03:00:00 GMT  
 Error when creating db on SQL-server 6.5

But nothing is created on the SQL-server ?!

Kenneth Solberg

  This is not an error, but merely an information message for your pleasure.

  --
  VB-Joker
  MCSE

  Please post all replies to newsgroup!


    I run this code:

    Dim db As New ADODB.Connection
    Dim cmd As New ADODB.Command
    Dim rstSQL As New ADODB.Recordset

    (...)

        db.Open "driver={SQL Server};server=test;" & "uid=sa;pwd="
        db.Execute "CREATE DATABASE vb_test"

    And I get the following error message:
    Runtime Error message: "[Microsoft][ODBC SQL Server Driver][SQL Server]CREATE DATABASE: allocating 256 pages on disk 'master'"

    What's wrong ???

    Thanks in advance !!

    Kenneth Solberg



Fri, 04 May 2001 03:00:00 GMT  
 Error when creating db on SQL-server 6.5

I think you need to loop thru the errors collection in order to get all the errors/warnings/info messages. Anyway, you need to be in the master database in order to use the CREATE DATABASE statement, if this is not your default database fo the connection you can use "USE master" as the first part of your query.

Dim errLoop as ADODB.Error
Dim db As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rstSQL As New ADODB.Recordset

    On Error GoTo Err_Test

    db.Open "driver={SQL Server};server=test;" & "uid=sa;pwd="
    db.Execute "CREATE DATABASE vb_test"

    Exit Function
Err_Test:
    For Each errLoop in db.Errors
        MsgBox errLoop.NativeError
    Next

    Exit Function

--
VB-Joker
MCSE

Please post all replies to newsgroup!


  But nothing is created on the SQL-server ?!

  Kenneth Solberg

    This is not an error, but merely an information message for your pleasure.

    --
    VB-Joker
    MCSE

    Please post all replies to newsgroup!


      I run this code:

      Dim db As New ADODB.Connection
      Dim cmd As New ADODB.Command
      Dim rstSQL As New ADODB.Recordset

      (...)

          db.Open "driver={SQL Server};server=test;" & "uid=sa;pwd="
          db.Execute "CREATE DATABASE vb_test"

      And I get the following error message:
      Runtime Error message: "[Microsoft][ODBC SQL Server Driver][SQL Server]CREATE DATABASE: allocating 256 pages on disk 'master'"

      What's wrong ???

      Thanks in advance !!

      Kenneth Solberg



Fri, 04 May 2001 03:00:00 GMT  
 Error when creating db on SQL-server 6.5

Thanx.

The dba had to turn up the available space on the 'master'.

Kenneth Solberg

  I think you need to loop thru the errors collection in order to get all the errors/warnings/info messages. Anyway, you need to be in the master database in order to use the CREATE DATABASE statement, if this is not your default database fo the connection you can use "USE master" as the first part of your query.

  Dim errLoop as ADODB.Error
  Dim db As New ADODB.Connection
  Dim cmd As New ADODB.Command
  Dim rstSQL As New ADODB.Recordset

      On Error GoTo Err_Test

      db.Open "driver={SQL Server};server=test;" & "uid=sa;pwd="
      db.Execute "CREATE DATABASE vb_test"

      Exit Function
  Err_Test:
      For Each errLoop in db.Errors
          MsgBox errLoop.NativeError
      Next

      Exit Function

  --
  VB-Joker
  MCSE

  Please post all replies to newsgroup!


    But nothing is created on the SQL-server ?!

    Kenneth Solberg

      This is not an error, but merely an information message for your pleasure.

      --
      VB-Joker
      MCSE

      Please post all replies to newsgroup!


        I run this code:

        Dim db As New ADODB.Connection
        Dim cmd As New ADODB.Command
        Dim rstSQL As New ADODB.Recordset

        (...)

            db.Open "driver={SQL Server};server=test;" & "uid=sa;pwd="
            db.Execute "CREATE DATABASE vb_test"

        And I get the following error message:
        Runtime Error message: "[Microsoft][ODBC SQL Server Driver][SQL Server]CREATE DATABASE: allocating 256 pages on disk 'master'"

        What's wrong ???

        Thanks in advance !!

        Kenneth Solberg



Fri, 04 May 2001 03:00:00 GMT  
 Error when creating db on SQL-server 6.5
Boy, without specifying a database size, I don't know, usually I do
CREATE DATABASE newdb
ON master = 8
LOG ON tempdb = 4

or similar, this creates a 12 meg database, 8 for DB and 4 for trans
log.. I have never done just create database mydb in fear of maxing
our the SQL Server current DB.. Henry

On Mon, 16 Nov 1998 15:27:34 +0100, "Kenneth Solberg"

Quote:

>Thanx.

>The dba had to turn up the available space on the 'master'.

>Kenneth Solberg

>  I think you need to loop thru the errors collection in order to get all the errors/warnings/info messages. Anyway, you need to be in the master database in order to use the CREATE DATABASE statement, if this is not your default database fo the connection you can use "USE master" as the first part of your query.

>  Dim errLoop as ADODB.Error
>  Dim db As New ADODB.Connection
>  Dim cmd As New ADODB.Command
>  Dim rstSQL As New ADODB.Recordset

>      On Error GoTo Err_Test

>      db.Open "driver={SQL Server};server=test;" & "uid=sa;pwd="
>      db.Execute "CREATE DATABASE vb_test"

>      Exit Function
>  Err_Test:
>      For Each errLoop in db.Errors
>          MsgBox errLoop.NativeError
>      Next

>      Exit Function

>  --
>  VB-Joker
>  MCSE

>  Please post all replies to newsgroup!


>    But nothing is created on the SQL-server ?!

>    Kenneth Solberg

>      This is not an error, but merely an information message for your pleasure.

>      --
>      VB-Joker
>      MCSE

>      Please post all replies to newsgroup!


>        I run this code:

>        Dim db As New ADODB.Connection
>        Dim cmd As New ADODB.Command
>        Dim rstSQL As New ADODB.Recordset

>        (...)

>            db.Open "driver={SQL Server};server=test;" & "uid=sa;pwd="
>            db.Execute "CREATE DATABASE vb_test"

>        And I get the following error message:
>        Runtime Error message: "[Microsoft][ODBC SQL Server Driver][SQL Server]CREATE DATABASE: allocating 256 pages on disk 'master'"

>        What's wrong ???

>        Thanks in advance !!

>        Kenneth Solberg



Sat, 05 May 2001 03:00:00 GMT  
 Error when creating db on SQL-server 6.5
Your way is without doubt the cleanest way. Without the 'ON'-clause
the size of the db created was about 1 mb.

Kenneth


Quote:
>Boy, without specifying a database size, I don't know, usually I do
>CREATE DATABASE newdb
>ON master = 8
>LOG ON tempdb = 4

>or similar, this creates a 12 meg database, 8 for DB and 4 for trans
>log.. I have never done just create database mydb in fear of maxing
>our the SQL Server current DB.. Henry



Sat, 05 May 2001 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. I need, must have program for converting Access DB to SQL server 6.5 Script

2. Connect to 2 different SQL Server 6.5 db

3. Creating ODBC connection to SQL Server 6.5 with VB4

4. Creating SQL Server tables 6.5 in VB4

5. Data objects closed error in ADO 2.1 and SQL server 6.5

6. sql server 6.5 ado error

7. Error doing update with VB 3.0 and SQL Server 6.5

8. Connection errors with Visual Basic 4 16-bit and SQL server 6.5 on a 3.11 platform

9. ODBC error after upgrading to Microsoft SQL server 6.5

10. VBScript Error due to converting databases from Access to SQL Server 6.5

11. Error 20532 Crystal 6, SQL Server 6.5 and VB5

12. S10008 Error From SQL Server 6.5 Running VB 5.0 Stored Procedures

 

 
Powered by phpBB® Forum Software