I am experiencing intermittent connection problems with the Northwind database and sql server express. The most frequent error message indicates that I am already logged in and will not allow another user.
The odd thing is that even when I am locked out I can access a Northwind database from another connection on Server Explorer.
I ran code to demonstrate simple binding for two text boxes, no problem. I added a project to show complex binding using the datagrid view tool, but could not get past selecting the database.
I tried the same simple binding project on another computer running a beta version of VS 2005 Pro and could not connect to Northwind on that computer also. (Two different Northwind databases, different computers)
A couple days ago I restored the database in Solutions Manager and that helped for a while, but I should not have to resort to that, I know.
How do I remove the user lock? I tried Solutions Manager Express with the first computer but could not access the database in the management module.
The exact text of the error would help. It sounds like you might be trying to access the data through both a User Instance and through the parent instance. This doesn't work since only one copy of SQL can access a database at a time.
Mike
|||Mike-
I learned that whenever I had a problem with connecting to a database, it was because I was using the dataset from the prior project in the solution, in a new project.
Thanks for replying.
Ruel
P.S.
I don't know if I should start a new thread, but how do I pull data from an Excel spreadsheet into a sql server database table?
|||Hi,
i would suggest to refer
http://blogs.msdn.com/euanga/archive/2006/07/20/672272.aspx
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=293466&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1088614&SiteID=1
HTH
Hemantgiri S. Goswami
|||Thanks Hemantgiri -
The links were helpful for understanding the process of pulling data files into sql server. However, I am still running into a roadblock. For instance, the following:
===================================================================
bulk insert
AAS Accounts
from 'c:\documents and settings\ruel\desktop\invest\aas downloads\dailydownloads'
===================================================================
Where:
AAS = Database Name
Accounts = Table Name
Gives the following error message:
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near 'Accounts'.
|||Hi,
run it like,
bulk insert
AAS..Accounts
from 'c:\documents and settings\ruel\desktop\invest\aas downloads\dailydownloads'
or
bulk insert
AAS.ObjectOwner.Accounts
from 'c:\documents and settings\ruel\desktop\invest\aas downloads\dailydownloads'
Hemantgiri S. Goswami
|||Tried the following as you suggested
bulk insert AAS..Accounts
from 'c:\documents and settings\ruel\desktop\invest\aas downloads\dailydownloads\2a20070112.xls'
With the resulting error message:
Msg 4863, Level 16, State 1, Line 1
Bulk load data conversion error (truncation) for row 1, column 1 (AccountNo).
Column 1 of table Accounts is nchar(15) - I raised it from 10 to 15 to see if that would take care of the truncation issue.
The format for column 1 of the xls file is general.
I have had a similar experience with an xml file.
I also tried the bcp utility to format a file for input but I get a message telling me that either the server does not exist or I do not have access.
Thanks for your assistance
Ruel
|||Could not get to the server with the bcp utility so I tried bulk insert. I found that I had to use "firstrow=2" to get past error messages.
bulk insert
AAS..Accounts
from 'c:\documents and settings\ruel\desktop\invest\aas downloads\dailydownloads\2a20070112.xls'
with
(
firstrow=2
)
However, the above returns the following message in SSMSE:
(0 row(s) affected)
|||Hi,
Could ensure the length of the all field!!!!
Hemantgiri S. Goswami
No comments:
Post a Comment