Hi,
Here I have got a new case.
I have two field, One: "Customer_ID" Two: "Customer_Name" Meanwhile I have an existing database named as "ID_Info" where most of the "Customer_ID" and "Customer_name" are existed. Now I'm recognizing only "Customer ID" from the form and by using [Database Check] rules I'm pulling the existed "Customer Name" form the database. In this scenario, sometimes I get some new "Customer ID" with "Customer Name" which is not exist in my existing "ID_Info" database.
Now I need a way to insert those new "Customer ID" and "Customer Name" from ABBYY Flexicapture. In my case the use will enter the new "Customer ID" And "Customer Name" into the particulate field in abbyy, now is it possible to insert those "Cutomer_ID" and "Customer_Name" values into the "ID_Info" database while field verification or by using custom action?
Here I have got a new case.
I have two field, One: "Customer_ID" Two: "Customer_Name" Meanwhile I have an existing database named as "ID_Info" where most of the "Customer_ID" and "Customer_name" are existed. Now I'm recognizing only "Customer ID" from the form and by using [Database Check] rules I'm pulling the existed "Customer Name" form the database. In this scenario, sometimes I get some new "Customer ID" with "Customer Name" which is not exist in my existing "ID_Info" database.
Now I need a way to insert those new "Customer ID" and "Customer Name" from ABBYY Flexicapture. In my case the use will enter the new "Customer ID" And "Customer Name" into the particulate field in abbyy, now is it possible to insert those "Cutomer_ID" and "Customer_Name" values into the "ID_Info" database while field verification or by using custom action?
コメント
4件のコメント
In field verification this can only be done by means of custom action. You need to create a windows forms library so that when users trigger custom action, a dialogue will apear and he could enter Customer ID and name that should be added to database.
Regards
Tim
Const adOpenStatic = 3
Const adLockOptimistic = 3
dim CID, Cname
CID= me.Field("Customer_ID").Value
Cname= me.Field("Customer_Name").Value
Set objConnection = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")
objConnection.Open _
"Provider = Microsoft.Jet.OLEDB.4.0; " & _
"Data Source = D:\SSK\Database.mdb"
objRecordSet.Open "INSERT INTO ID_Info" & _
"(Customer_ID) " & _
"VALUES (CID)", & _
"(Customer_Name) " & _
"VALUES (Cname)", _ objConnection, adOpenStatic, _ adLockOptimistic
I think I may see the issue, it looks like you may have issues with your VB syntax for the objRecordSet.Open command.
Try replacing with the following:
objRecordSet.Open "INSERT INTO ID_Info " & _
"(Customer_ID, Customer_Name) " & _
"VALUES (CID, Cname)", _ objConnection, adOpenStatic, _ adLockOptimistic
Dirk
サインインしてコメントを残してください。