Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

MS Access Find_ Method - Format of the initialization string

  Asked By: Eleanor    Date: Jan 20    Category: Sharepoint    Views: 938

Using the Definition Editor, I get the following error returned from the generated Find_xxx method:

"Format of the initialization string does not conform to the specification starting at index 0."

I can successfully run the generated FindAll_ methods and get back a list of keys, but when I try to use a key in the Find_ method, I get the above error.

I have tried this on multiple tables against an Access 2000 and an Access 2002 database. Every table has thrown this error.

I have also tried this on a table in an Oracle database and it works without problem.

I assume that the problem is with the Find_xxx query and not the connect string, but I do not know how to further isolate the problem. Any suggested solutions or hints in further isolating the problem would be appreciated.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Arlene Hodge     Answered On: Jan 20

I have resolved the issue. In the Find_XXX SQL, change the Parameter name to "?".

Original was something like:

Select ... from ... where ID=@ID

change to:

Select ... from ... where ID=?

I have tried this on both Access 2000 and Access 2002.

 
Answer #2    Answered By: Jolene Sandoval     Answered On: Jan 20

A related issue is that the key  column name may contain spaces. In this case, do the following in the Definition Editor.

1) Edit the Find_XXX method  SQL and put double quotes (") around the column name. The result should look something like:

Select ... from ... where "key column name"=?

2) In the Parameters section, edit the Name and Display name to remove the spaces, The result should look something like:

 




Tagged: