header
header
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome, Guest. Please login or register.
November 22, 2008, 05:28:25 am
Username: Password:
Login with username, password and session length

Forgot your password?
 
SQL exception "invalid table name"
Welcome, Guest. Please login or register.
November 22, 2008, 05:28:25 am
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  SQL exception "invalid table name"
« previous next »
Pages: [1] Print
Author Topic: SQL exception "invalid table name"  (Read 318 times)
Max
Newbie
*
Posts: 2


« on: June 19, 2008, 09:54:13 pm »

I'm working with Groovy scripts and soapUI Pro. I have a Groovy script that connect to db and retrieving data to validate.
I get a SQL exception "invalid table name" when in my sql statement the db schema is parametrazed '${schema}.table_name'.
if I hard-code db schema value 'dbschema.table_name' it succeeds.
There seems to be a problem interpreting variables when building a SQL string.

Here is my script.

def schema = context.expand( '${#Project#schema}' )
def query = "SELECT user_name FROM ${schema}.account_customer WHERE email = 'myemail@test.com'";

Please tell me what I am doing wrong.

Thanks
« Last Edit: June 19, 2008, 10:00:59 pm by Max » Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #1 on: June 19, 2008, 10:04:15 pm »

Hi,

This sounds like a groovy-issue to me, is this soapUI Pro 2.0.2?

regards,

/Ole
eviware.com
Logged
Max
Newbie
*
Posts: 2


« Reply #2 on: June 19, 2008, 10:15:43 pm »

Yes, it is soapUI Pro 2.0.2
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
header header
header
header