the error come out at the bold section... pls help to check my algorithm ...thanks
Dim qryTake, rsTake
dim qryCbomFiltered, rsFiltered
qryChange = "SELECT PartNumber,PartDesc, comCode, MPN,QMPN,AML, SupplierName, LeadTime from cbomnew where comCode= 'PCEC' || comCode='LOX'||comCode='CCEC' "
Set rsTake= conn.Execute(qryChange)
qryCbomFiltered = "select PartNumber , SupplierName from cbom_Filtered"
set rsFiltered = conn.Execute(qryCbomFiltered)
if not rstake.eof then
while not rsTake.eof
while not rsFiltered.eof
if rsTake.Fields("PartNumber") = rsFiltered.Fields("PartNumber")
then
found true
else rsFiltered.movenext
end if
wend
rsTake.movenext
wend
If found = True Then
response.write(" data exist")
Else
Dim qryinsert, rsinsert
qryisert = "INSERT INTO cbom_filtered(PartNumber,PartDesc, comCode, MPN,QMPN,AML, SupplierName, LeadTime ) values ("&rsTake.Fields("PartNumber")&", "&rsTake.Fields("PartDesc")&", "&rsTake.Fields("comCode")&","&rsTake.Fields("MPN" )&","&rsTake.Fields("QMPN")&", "&rsTake.Fields("AML")&","&rsTake.Fields("Supplier Name")&","&rsTake.Fields("LeadTime")&")"
Set rsinsert = conn.execute(qryinsert)
End if
end if
3 1141
Hi,
What are you getting at the Insert statement?
Does all the fields in the insert query conatin numeric values?
If not try including them within quotes.
e.g. '"&rsTake.Fields("SupplierName")&"'.
You can also debug the it by just Response.write(qryisert)
the error come out at the bold section... pls help to check my algorithm ...thanks
Dim qryTake, rsTake
dim qryCbomFiltered, rsFiltered
qryChange = "SELECT PartNumber,PartDesc, comCode, MPN,QMPN,AML, SupplierName, LeadTime from cbomnew where comCode= 'PCEC' || comCode='LOX'||comCode='CCEC' "
Set rsTake= conn.Execute(qryChange)
qryCbomFiltered = "select PartNumber , SupplierName from cbom_Filtered"
set rsFiltered = conn.Execute(qryCbomFiltered)
if not rstake.eof then
while not rsTake.eof
while not rsFiltered.eof
if rsTake.Fields("PartNumber") = rsFiltered.Fields("PartNumber")
then
found true
else rsFiltered.movenext
end if
wend
rsTake.movenext
wend
If found = True Then
response.write(" data exist")
Else
Dim qryinsert, rsinsert
qryisert = "INSERT INTO cbom_filtered(PartNumber,PartDesc, comCode, MPN,QMPN,AML, SupplierName, LeadTime ) values ("&rsTake.Fields("PartNumber")&", "&rsTake.Fields("PartDesc")&", "&rsTake.Fields("comCode")&","&rsTake.Fields("MPN" )&","&rsTake.Fields("QMPN")&", "&rsTake.Fields("AML")&","&rsTake.Fields("Supplier Name")&","&rsTake.Fields("LeadTime")&")"
Set rsinsert = conn.execute(qryinsert)
End if
end if
Hi,
What are you getting at the Insert statement?
Does all the fields in the insert query conatin numeric values?
If not try including them within quotes.
e.g. '"&rsTake.Fields("SupplierName")&"'.
You can also debug the it by just Response.write(qryisert)
the insert values are integer and varchar.. it cannot be
'"&rsTake.Fields("SupplierName")&"' because i will insert only those value which are not in the cbomnew table... i need to compare it with cbom_filtered..
if not found true...( mean no value similiar.. then only i add)
i need to add that exact value which found none in the cbomnew table..
so,,, the exace value is this below..but it has error.. is my algorithm correct??? tthanks
qryisert = "INSERT INTO cbom_filtered(PartNumber,PartDesc, comCode, MPN,QMPN,AML, SupplierName, LeadTime ) values ("&rsTake.Fields("PartNumber")&", "&rsTake.Fields("PartDesc")&", "&rsTake.Fields("comCode")&","&rsTake.Fields("MPN" )&","&rsTake.Fields("QMPN")&", "&rsTake.Fields("AML")&","&rsTake.Fields("Supplier Name")&","&rsTake.Fields("LeadTime")&")"
Hi,
Code is looking to be right. But can you please specify which error you are getting? Also if rsTake contains both numeric and varchar value it should be in quotes.There may be you are getting ,Syntax error.
the insert values are integer and varchar.. it cannot be
'"&rsTake.Fields("SupplierName")&"' because i will insert only those value which are not in the cbomnew table... i need to compare it with cbom_filtered..
if not found true...( mean no value similiar.. then only i add)
i need to add that exact value which found none in the cbomnew table..
so,,, the exace value is this below..but it has error.. is my algorithm correct??? tthanks
qryisert = "INSERT INTO cbom_filtered(PartNumber,PartDesc, comCode, MPN,QMPN,AML, SupplierName, LeadTime ) values ("&rsTake.Fields("PartNumber")&", "&rsTake.Fields("PartDesc")&", "&rsTake.Fields("comCode")&","&rsTake.Fields("MPN" )&","&rsTake.Fields("QMPN")&", "&rsTake.Fields("AML")&","&rsTake.Fields("Supplier Name")&","&rsTake.Fields("LeadTime")&")"
Sign in to post your reply or Sign up for a free account.
Similar topics
by: mike420 |
last post by:
I think everyone who used Python will agree that its syntax is
the best thing going for it. It is very readable and easy
for everyone to learn. But, Python does not a have very good
macro...
|
by: Andrew Koenig |
last post by:
PEP 315 suggests that a statement such as
do:
x = foo()
while x != 0:
bar(x)
be equivalent to
while True:
|
by: David MacQuigg |
last post by:
Seems like we need a simple way to extend Python syntax that doesn't
break existing syntax or clash with any other syntax in Python, is
easy to type, easy to read, and is clearly distinct from the...
|
by: deko |
last post by:
I'm trying to log error messages and sometimes (no telling when or where)
the message contains a string with double quotes. Is there a way get the
query to insert the string with the double...
|
by: Keith H Duggar |
last post by:
Can anyone point me to the origin and history of the dot
syntax for accessing structures?
Were there languages prior to C that used it?
Who invented it?
etc.
|
by: huey_jiang |
last post by:
Hi All,
I am trying to figure out a right syntax to convert an integer array
into hex array. sprintf worked for me on doing single integer:
int i, Iarray, n=15;
char buf;
sprintf(buf,...
|
by: martinharvey via DotNetMonster.com |
last post by:
I would be very grateful if someone could help me with a stored procedure
syntax problem
I want to insert the value "OrderTotal" into databasetable("Newtable") column
"OrderTotal"
(money (8))....
|
by: Superman859 |
last post by:
Hello everyone. Heads up - c++ syntax is killing me. I do quite well
in creating a Java program with very few syntax errors, but I get them
all over the place in c++. The smallest little things...
|
by: HalfCoded |
last post by:
Hi everyone,
I am currently working at learning perl but come up with two problems i can't clear on my own.
I use perl version 5.8 on windows xp
The complete I am working on is supposed to...
|
by: bearophileHUGS |
last post by:
I have just re-read the list of changes in Python 2.6, it's huge,
there are tons of changes and improvements, I'm really impressed:
http://docs.python.org/dev/whatsnew/2.6.html
I'll need many...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
| |