Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

dsn connection

Posted on 2001-06-23
9
Medium Priority
?
269 Views
Last Modified: 2013-12-24
When i am using northwind database (built in when installed sql server) to create a recordset, it is ok.
But when i am using my own creation database to create a recordset, one dialog box come out showing:

[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'User'.

I use the same driver in odbc when i create the DSN

I am using Sql server 7.0 and ultradev 4.0 with Windows2000 server.

Please help...
thank you
0
Comment
Question by:anwar13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
9 Comments
 

Author Comment

by:anwar13
ID: 6221499
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'User'.

User here is the user table.
0
 
LVL 15

Expert Comment

by:Eric AKA Netminder
ID: 6222403
Can you post your query?
0
 

Author Comment

by:anwar13
ID: 6222574
ALTER TABLE [dbo].[File] DROP CONSTRAINT FK_File_USER
GO

if exists (select * from sysobjects where id = object_id(N'[dbo].[USER]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[USER]
GO

if exists (select * from sysobjects where id = object_id(N'[dbo].[File]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[File]
GO

CREATE TABLE [dbo].[USER] (
     [UserID] [numeric](18, 0) NOT NULL ,
     [name] [varchar] (50) NOT NULL ,
     [password] [varchar] (50) NOT NULL ,
     [email] [varchar] (50) NOT NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[File] (
     [UserID] [numeric](18, 0) NOT NULL ,
     [FileID] [numeric](18, 0) NOT NULL ,
     [FileDesc] [varchar] (8000) NOT NULL ,
     [FileTitle] [varchar] (200) NOT NULL ,
     [FilePath] [varchar] (100) NOT NULL ,
     [FileDate] [datetime] NOT NULL
) ON [PRIMARY]
GO
0
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 
LVL 15

Expert Comment

by:Eric AKA Netminder
ID: 6224832
Looks to me like USER is being thought of as a keyword or reserved word...

Try changing the name of the USER table to something else, and see what happens...
0
 
LVL 1

Accepted Solution

by:
dclary earned 600 total points
ID: 6257502
The only message I get with SQL 7.0 is

"The total row size (8353) for table 'File' exceeds the maximum number of bytes per row (8060). Rows that exceed the maximum number of bytes will not be added."

Hope that helps
0
 

Expert Comment

by:PhilipT1999
ID: 6873598
I agree with dclary your create table is 8336 plus the length of the date. Which exceeds the max row size.  You have a fileDesc of 8000 (seems kinda large), just lower that until the total length is less that 8353 or break it out into a second table.
 
0
 

Expert Comment

by:PhilipT1999
ID: 6873600
I meant lower it until the total length is below 8060 bytes.  Sorry about the typo.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question