473,394 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

ASP table update problem

1
Hi everyone.

I have experienced a weird type of error – something obvious but I can’t get it.
I am working with the ASP (VBSCRIPT) and FoxPro tables via ODBC. The goal is to update one table using records from another(same structure). The task works perfectly on the small table (300 – 400 records) but giving me the headache with the 6000+ records. Sometimes code works like a charm (on LOCALHOST majority of the time) but most frequently it fails with the error

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Visual FoxPro Driver]Variable 'Q990P49' is not found


where variable name is different most of the time.

Code:

<%
set cn = Server.CreateObject("ADODB.Connection")
cDatabasePath = Server.MapPath("/DATA")
connstr = "Driver={Microsoft Visual FoxPro Driver}; UID=;SourceDB="&cDatabasePath&";SourceType=DBF;"
cn.Open connstr

adOpenStatic = 3
%>

<%
Dim rs_aMBL
Set rs_aMBL = CreateObject("ADODB.Recordset")
sqlStr = ""
sqlStr = sqlStr & "SELECT * "
sqlStr = sqlStr & "FROM "
sqlStr = sqlStr & cTableMBL
sqlStr = sqlStr & " WHERE BL_Number = '" & cBL_Number & "' AND "
sqlStr = sqlStr & " BL_Repfac = '" & cRepeat & "' "
rs_aMBL.Open sqlstr, connStr, 1,3
nRecNewMBL = rs_aMBL.Recordcount
IF nRecNewMBL > 0 THEN
Dim rs_Master_MBL
Set rs_Master_MBL = CreateObject("ADODB.Recordset")
sqlStr = ""
sqlStr = sqlStr & "SELECT * "
sqlStr = sqlStr & " FROM "
sqlStr = sqlStr & cTableMasterMBL
rs_Master_MBL.Open sqlstr, connStr, 1,3

rs_Master_MBL.AddNew

CALL Update_MBL
rs_Master_MBL.Update

END IF

SUB Update_MBL
rs_Master_MBL.Fields("FIELD1") = rs_aMBL.Fields("FIELD1")
rs_Master_MBL.Fields("FIELD2") = rs_aMBL.Fields("FIELD2")
.
.
.
rs_Master_MBL.Fields("FIELD99") = rs_aMBL.Fields("FIELD99")
END SUB

The error happening on the rs_Master_Mbl.update statement.

Thank you in advance for your attention
.
Apr 9 '07 #1
0 1110

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: dharmadam | last post by:
Is it possible to pass a column name or the order of the column name in the DB2 table table function. For example, I want to update the address of a person by passing one of the address column name...
4
by: Laura | last post by:
Here's the situation: I'm trying to use an update query to copy data from one row to another. Here is the situation: I have 5 companies that are linked to each other. I need to show all 5...
5
by: PAUL | last post by:
Hello, I have 2 tables with a relationship set up in the dataset with vb ..net. I add a new record to the parent table then edit an existing child record to have the new parent ID. However when I...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
2
by: romepatel | last post by:
Hello, I am adding a row dynamically to the table , var table = document.getElementById('example'); var rowCount = table.rows.length; var row = table.insertRow(rowCount); now i want to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.