Re: creating a database on the server

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Scott Baxter (sbaxter_at_websearchstore.com)
Date: 05/24/04


Date: Mon, 24 May 2004 11:12:28 -0700

Hello,

Thanks for your help. I just wanted to create the actual database on the
server, then create a table within the database. I realize the sample code
I sent is probably not the right code.

I posted to several groups I thought seemed related to this question. Maybe
I picked the wrong ones.

Thanks.

Scott Baxter

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:OanW1WbQEHA.252@TK2MSFTNGP10.phx.gbl...
> that creates a Table, not a new DB....which is it you are after? Also, why
> are you posting it to these groups? some .Net, some not, some SQL.... ??
>
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Scott Baxter" <sbaxter@websearchstore.com> wrote in message
> news:ukc9HSbQEHA.3300@TK2MSFTNGP09.phx.gbl...
> > Is there a way to create a brand new database on the server?
> >
> > Someone gave me the asp code below, but I haven't gotten it to work yet.
> >
> > Thanks for any help.
> >
> > <%
> > Dim strSQL
> > Dim cnnTest
> >
> > strSQL = strSQL & "CREATE TABLE tblTest " & vbCrLf
> > strSQL = strSQL & "(" & vbCrLf
> > strSQL = strSQL & "ID int IDENTITY NOT NULL " & vbCrLf
> > strSQL = strSQL & " constraint PK_tblTestID PRIMARY KEY, " & vbCrLf
> > strSQL = strSQL & "FirstName varchar (30) NOT NULL, " & vbCrLf
> > strSQL = strSQL & "LastName varchar (30) NOT NULL, " & vbCrLf
> > strSQL = strSQL & "DateOfBirth datetime NULL" & vbCrLf
> > strSQL = strSQL & ")" & vbCrLf
> >
> > Set cnnTest = Server.CreateObject("ADODB.Connection")
> > response.write "got to here"
> > cnnTest.Open "Provider=SQLOLEDB;Data Source=localhost;" _
> > & "Initial Catalog=test;User Id=sa;Password=;" _
> > & "Connect Timeout=15;Network Library=dbmssocn;"
> > response.write "are we heare"
> > cnnTest.Execute strSQL
> > cnnTest.Close
> > Set cnnTest = Nothing
> > %>
> >
> >
> >
>
>



Relevant Pages

  • Create SharePoint Portal failed.
    ... One mentioned ensuring that SQL Server uses a case ... 13:55:40 Service database server is 'USDC-JOHRIV'. ... Update dbo.propertylist set DisplayName = N'Last name' ...
    (microsoft.public.sharepoint.portalserver)
  • Re: ADO Connection Timeout
    ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)
  • Web Developers - Happy Hearts And HDTV! - Lockergnome
    ... Certificate on your MSIIS Web server. ... getting data from a database is only half the problem. ... Zend recently started a series about building rock solid code in PHP. ... which provides bulk database conversion. ...
    (freebsd-questions)
  • Re: TNS could not resolve the connect identifier
    ... This database resides on Machine A. ... The Web server is running on Machine B. ... Using tnsping is not as good as using a real connection such as via ... client (note that this is terminology that appears in the 10g R2 ...
    (comp.databases.oracle.server)
  • Config for OLTP system
    ... extrenal disks fo the 60GByte database server. ... IBM Informix Dynamic Server Configuration Parameters ... # BUFFSIZE - OnLine no longer supports this configuration parameter. ...
    (comp.databases.informix)