We have a standered template for Invoices written in VB.net. In a vain attempt to speed up the retrevial of invoices for customers, i have created a linked server, and import all the incoice data into the SQL Tables. This in its self causes a few problems... so i need some help
1. is there a way in asp to display the invoices on a web page fairly quickly and if so how ??
2. if importing the data into SQL tables is the way to go, how can i manage this. I have tried the following statement
select * into #tempInvoice from OpenQuery( QODBC, 'Select * from invoice')
Use QB
TRUNCATE TABLE Invoice
Insert Invoice select * from #tempInvoice
drop Table #tempInvoice
Select * into #tempCustomer from OpenQuery( QODBC, 'Select * from Customer')
Use QB
TRUNCATE TABLE Customer
Insert Customer select * from #tempCustomer
Drop Table #tempCustomer
select * into #tempInvoiceLine from OpenQuery( QODBC, 'Select * from InvoiceLine')
Use QB
TRUNCATE TABLE INVOICELine
Insert InvoiceLine select * from #tempInvoiceline
Drop Table #tempInvoiceline
select * into #tempTaxCode from OpenQuery( QODBC, 'Select * from TaxCode' )
Use QB
TRUNCATE TABLE TaxCode
Insert TaxCode select * from #tempTaxCode
Drop Table #tempTaxCode
Im running this on a windows 2003 server using SQL 2005. this is one session in SQL Management Studio. The first three fire off ok ( slow but ok ) , the last statment returns an error stating it can not return rows. If i try and fire it again i get the same error on the first query and end up having to reboot, and run each qyuery one at a time, in a new query window. Is there anyway i can overcome this as its a real pain in the a** . Im sure theres a simple way to produce the invoices on a webpage .. I just need to be shown the macanics of it
thanks in advance |