I am getting a “Error loading primary key data, For input string:” error when the program tries to pull in data into a fk field. This error was not present before and the information went in as it was supposed to. I have apparently done something, but I am not sure what. Below I have put all information that I thought would be relevant, but if I need to I will post more info.
Server Information
Servoy version 3.5.7-build 520, repository version 31
Current time: Tue Sep 30 10:12:39 EDT 2008
Uptime: 1 day 10 hours 9 minutes 28 seconds
User Information
Logged in as: Philip
JDK Information
java.vm.name=Java HotSpot™ Client VM
java.vm.version=1.5.0_13-121
java.vm.info=mixed mode, sharing
java.vm.vendor=“Apple Computer, Inc.”
Operating System Information
os.name=Mac OS X
os.version=10.4.11
os.arch=ppc
System Information
runtime.allocatedMemory=65088K
runtime.usedMemory=23017K
The database is a Sybase 9 Database.
The method that is calling the import:
// This method searches the CONTACTS table for matches to apply to buying realtor in the INSPECTION record
// If an exact match was found, a relation is established to that contact record
// more than one matches shows a chooser
//
// If no matches were found, then any existing link to a contact will be deleted
// remove existing relation to contact
fk_buyer_realtor_id = null;
controller.relookup();
// recommit changed changed data (this time calc will stick b/c no related contact to override)
var new_value = arguments[1];
var dp = elements[application.getMethodTriggerElementName()].getDataProviderID();
controller.setDataProviderValue(dp, new_value);
// if contact name was deleted or there isn’t sufficient name info, delete any link to contact
if(!buyer_lst_name || !buyer_fst_name)
return;
// get matching contact ids
var contacts = forms.frm_insp_find_contact_dlg.find_contact(buyer_lst_name, buyer_fst_name);
if(!contacts)
return;
// Check Web-Client
var is_web_client = application.getApplicationType() == 5;
// ask user to auto-populate (Not Web Client)
if(!is_web_client){
var msg = “Matching contact information for a buying realtor was found in the CRM.\n”
msg += “Would you like to auto-populate the rest of the fields with this information?”;
var confirm = plugins.dialogs.showQuestionDialog(“Auto-Populate Buying Realtor”, msg, “Yes”, “No”);
}
// confirmed by user or web client
if(is_web_client || confirm == “Yes”){
// multiple matches
if(contacts.length > 1){
var contact = forms.frm_insp_find_contact_dlg.show_chooser();
// action canceled by user
if(!contact)
return;
// single hit
} else {
var contact = contacts[0];
}
// create relation
fk_buyer_realtor_id = contact;
databaseManager.saveData();
}
The fk data provider is as follows with the headers in the first row:
Name |Type | Length|Row Ident|Allow Null|Sequence|Properties|
fk_buyer_realtor_id | Text | 40 | Blank | Yes | None | None |
The data provider that is being pulled in is:
Name |Type | Length|Row Ident|Allow Null|Sequence|Properties|
id |Text | 40 | pk | No | None | None |
I have looked in Sybase Central and made sure that the properties were consistent and they were. What could have changed that would all of the sudden cause the import not to work anymore? Any help would be greatly appreciated.