Banner Rotation Using Database

Results 1 to 4 of 4

Thread: Banner Rotation Using Database

  1. #1
    Joey W. Guest

    Default Banner Rotation Using Database

    Hello,<BR><BR>I am using the new article on Banner Rotation using a database and I can not get it to work at all on my site. It keeps giving me an error message when I run it on Line 3 <BR>Header Error<BR>/BannersInc.asp, Line 3<BR>The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content. <BR><BR>I set it up exactly as the article said and now I can not get it to work at all.<BR><BR>Thanks,<BR><BR>Joey<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Banner Rotation Using Database

    , Hi.<BR>Looks like we both are working on the same article, I have a previous post on the asp board a few below this one.. <BR>Would you be willing to teach me how to run the create Table script to create the table remotely on my SQL 7 db?<BR><BR>Here is the code I have so far trying to create the table remotely if you or anyone else can help me.<BR><BR>&#060;%<BR>Dim cn<BR>Dim oRS<BR><BR>Set cn = Server.CreateObject("ADODB.Connection")<BR>Set oRS = Server.CreateObject("ADODB.Recordset")<BR>cn.Open "DSN=DB;UID=login;Password=pass;"<BR>oRS.ActiveCon nection = cn<BR><BR>create table Banners<BR><BR>(<BR>BannerID int identity PRIMARY KEY,<BR>Image varchar(100),<BR>URL varchar(100),<BR>Hint varchar(100),<BR>Shown int,<BR>Clicked int,<BR>)<BR><BR>oRS.Close<BR>cn.Close<BR>Set oRS = Nothing<BR>Set cn = Nothing<BR>%&#062;<BR><BR>is this the right approach to creating the table?<BR><BR>p.s. I dont have Sql manager, just VI6 and Access 2000<BR>

  3. #3
    Joey W. Guest

    Default RE: Banner Rotation Using Database

    Hello,<BR><BR>I have never actually had to create a table through an ASP page.<BR><BR>But you should go to and have them send you an eval. copy of SQL Server 7 it is free except shipping but it is well worth it.<BR><BR>Joey

  4. #4
    Jairo Guest

    Default RE: Banner Rotation Using Database

    Daniel,<BR>I haven&#039t looked at the article and I use SQL Enterprise Manager to do my table creations. However, give this a shot in VI6:<BR><BR>1. In your Project Explorer, right click to Add A Data Connection.<BR>2. Set up an ODBC Machine/System Datasource using the SQL Server Driver (I don&#039t know if you have one on your system, but you can get one from your VI CD whenn installing).<BR> - Use SQL Server Authentication and plug in your login and password.<BR> - Set the default database to the correct database.<BR><BR> A DataEnvironment and a Connection1 will appear under your global.asa file in the Project Explorer.<BR><BR>3. Double-click Connection1, it will give you a list of tables on the SQL Server database. A DataView will appear.<BR><BR>4. If you right click on TABLE, it will give you an option to create a table - and you can plug in whatever you need here.<BR><BR>5. However, since you already have a create table script available, do this instead. Create a dummy table (I don&#039t know how to get to activate the Query Toolbar any other way yet).<BR> - Once it&#039s created, double-click on it from the DataView.<BR> - On the VI6 menu, select View, Toolbars, Query. It will bring up the Query Toolbar. Select the third button, Show SQL Pane. Here, you can plug in each create table one at a time, and Run the Query (which is the button with the exclamation mark).<BR> <BR>HTH,<BR>Jairo<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts