codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Type Mismatch  coops at 18:28 on Monday, January 12, 2004
 

Hello, I have a type mismatch that is driving me mad. If anyone can help?

I am trying to place data in an excel spreadsheet from an SQL database but it will not work. The code is:
----------------------------------------------------------------
Dim ExcelSheet

Set ExcelSheet = CreateObject("Excel.Application")

ExcelSheet.Application.Workbooks.Open "/forum/cdocumentsprodprod_base1.xls"
' show to user?
ExcelSheet.Application.Visible = False

set conn=server.CreateObject("ADODB.Connection")
conn.Open "product", "sa", "******"

set RSPRE_Grid = conn.Execute("select * from RSPRE order by id")
set RSPRE_IND = conn.Execute("select * from product where STATUS = 'PREINDUCTION'")

RSPRE_Grid.MoveFirst
do until RSPRE_Grid.EOF or RSPRE_IND.EOF
row = RSPRE_Grid("SHEET_ROW")
column = RSPRE_Grid("SHEET_COLUMN")
ExcelSheet.ActiveSheet.Cells(column,row).Value = RSPRE_IND("ESN") & " - " & ucase(RSPRE_IND("CUSTOMER"))
RSPRE_IND.MoveNext
loop
---------------------------------------------------------------

RSPRE is a table in SQL that has rows and columns to place the data.

If anyone can advise me it would be appreciated.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  How to dynamically create a calendar when I click a button?
•  c++ tutorials
•  Update a second table
•  Trackin Site behaviour
•  variable scope problem
•  dynamic crystal report generation
•  execute an Excel macro when the sheet is changed from ASP.NET
•  Re: form
•  form


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005