Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Works in Access, but not in SQL Server?

Author  Topic 

computerforce
Starting Member

10 Posts

Posted - 2007-02-02 : 20:11:48
There are two tables. I am trying to make it really simple.
Example:

first table:
tbl_answers
IDanswer (identity, autoincrement)
answer (varchar)

and second table:
tbl_results
IDresult (identity, autoincrement)
IDanswer (relation to the first table)
result (bit, 1 or 0), checkbox

I am linking them using all records from tbl_answers and only those from tbl_results .... left join.

In a form I can have:

tbl_answers.IDanswer___tbl_answers.answer tbl_results.result
1______________________Windows_______________Null
2______________________Linux_________________Null
3______________________Mac OS________________Null

(for example those are three answers to a survey question, "Which OS user uses?")

In MS Access, if use click on empty checkbox right from the Windows, linked table tbl_results will have one additional record with autoincremented IDresult, then IDanswer, will be updated with IDanswer from tbl_answers, and field result will be checked (true).

In SQL Server message appears:
"Another user has modified the content ...."

What seems to be the problem?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-03 : 03:41:51
Either you have the stored SQL code file opened twice, or another user has the same file opened as you do.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

computerforce
Starting Member

10 Posts

Posted - 2007-02-03 : 05:30:30
quote:
Originally posted by Peso

Either you have the stored SQL code file opened twice, or another user has the same file opened as you do.



I am testing the code at standalone computer, with sql server and enterprise manager. During tests it's even disconnected from network.

Another thing is - I did not open tables twice, cause I start only one sql view, based on two tables.
Go to Top of Page
   

- Advertisement -