Perforce Public Knowledge Base - Using Named Parameters with the Perforce ODBC Driver
Reset Search
 

 

Article

Using Named Parameters with the Perforce ODBC Driver

« Go Back

Information

 
Problem

The Perforce ODBC driver does not support named parameters. For example, the following SQL statement does not work:

 

select 
jobs.job, changes.change, changes.user, 
changes.description, files.file, files.revision 
FROM 
changes changes, fixes fixes, jobs jobs, Files 
WHERE 
jobs.job IN (@Key) and 
fixes.change = changes.change AND fixes.job = jobs.job and 
Files.change = Changes.change 

 

Solution

You can workaround the above problem by constucting the SQL statement without parameters.

Example

stmt = "select 
jobs.job, changes.change, changes.user, 
changes.description, files.file, files.revision 
FROM changes changes, fixes fixes, jobs jobs, Files
WHERE
jobs.job = '" + Parameters!JobName.Value + "' and
fixes.change = changes.change AND
fixes.job = jobs.job and

Files.change = Changes.change order by change"
Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255