Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ultradev's recordsets don't work for me

Status
Not open for further replies.

jdmaynard

Programmer
Mar 12, 2001
11
CA
When I create a 'simple' recordset in UD4 from a table in a SQL database, the dialog box shows all the tables listed as '88user.tablename'. (88user being the SQL username).When I try to use the recordset (or test it) I get a 'syntax error near 88'

I found if I remove the username prefix from the SQL command string everything works. Where have I screwed up to cause that prefix to appear, or alternatively, where have I screwed up to cause SQL server to grumble that the prefix is there.

Here's a picture---
When UD builds ny SQL string it goes:

SELECT this, that FROM user.table

which fails.

When I change it to:

SELECT this, that FROM table

it works. So why is that user prefix showing up?

thanks

Doug
 
user.tableName

is the convention for accessing a database. It's a security measure that can be implemented in large databases where different users own/have-access-to different tables in the same database.

By default, SQL Server reads dbo.tableName if you don't supply a prefix. dbo is short for DataBase Owner.

So why are you getting the syntax error? Hmmmm... well, my first guess would be because the userName starts with a number, because putting the prefix on the front of the tableName really shouldn't be throwing an error. That's the only thing I can think of.

Try it with a username that doesn't start with a number, and see if that helps. And in the future, it's always a good idea not to start userNames with numbers -- it will cause the occasional problem.

eg -- in vb, (and many other languages), you cannot start a variable name with a number -- so this may be confusing it? Like I said, though... it's just a guess -- but that's how many problems are solved. ;-)

penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top