|
Frank Kerrigan wrote: Solution: You need the machine and the instance name when speficifing a connection to the server MYPC\SQLSERVEREXPRESS
I also had to setup a specific SQL user as well as windows authenication with SQL Express didn't work too well.
Not really sure what you mean by setting up specific SQL users.. is that in SQL or do you mean another windows profile. im runnig XP HOME, which is why i had to use express as the full version is not compatable... might this be hindering it?
As for the server, i know the server name, and that doesnt seem to be helping. Any idea where i could find a nice trouble shooting guide perhaps? The SQL makes my head hurt. lol
"Love, Life and Option Explicit"
|
|
|
|
|
SQL accounts can be based on Windows accounts (or domain accounts) or SQL account that have no existence outside SQL.
Open SQL stidio manager and have a look at users.
|
|
|
|
|
I just tried to recreate your error and the closest I could get was when the SQLEXPRESS instance was not started.
Visual Studio and SQL are dead. Long live Visual Studio and SQL!
-- modified at 13:42 Monday 10th April, 2006
|
|
|
|
|
SQL express is very different to SQL Server. The following document should help to set it up.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvsdev05/html/vs05b1.asp
[^]
Also you could try connectionstrings.com
The good news is that if you do it all through code you can get it working just like a full version of SQL server and if you ever need to upgrade your Application to SQL server you just need to change the connection string.
Jon
|
|
|
|
|
Would perhaps my router for the network be affecting this? im just connecting to my own computer, but you never know with these things...
"Love, Life and Option Explicit"
|
|
|
|
|
hi,
when im using the follwing i'm getting a message that the command is already commited.
so how can i set up my odbc connection so that it will not auto commit all transaction.
OdbcCommand command = new OdbcCommand();<br />
OdbcTransaction transaction = null;<br />
<br />
command.Connection = connection;<br />
<br />
try<br />
{<br />
connection.Open();<br />
<br />
transaction = connection.BeginTransaction();<br />
<br />
command.Connection = connection;<br />
command.Transaction = transaction;<br />
<br />
command.CommandText =<br />
"Insert into Region (RegionID, RegionDescription) VALUES (100, 'Description')";<br />
command.ExecuteNonQuery();<br />
command.CommandText =<br />
"Insert into Region (RegionID, RegionDescription) VALUES (101, 'Description')";<br />
command.ExecuteNonQuery();<br />
<br />
}<br />
catch (Exception ex)<br />
{<br />
Console.WriteLine(ex.Message);<br />
try<br />
{<br />
<big>
transaction.Rollback();</big><br />
}<br />
catch<br />
{<br />
}<br />
}
please Help and thanks..
|
|
|
|
|
How to make a connection between ASP.NET Apllication and Tally Accounting software. and also how to import and export data from sql server to tally accounting software.
Pls give me suggestion and send some sample source code for the above.
Paul
|
|
|
|
|
i was not sure which forum to post this under but i hope someone can help me out. i am using microsoft visual basic express edition with sql server express edition. when the programs were first installed they worked fine, but recently i have been getting the error message: "Object reference is not set to an instance of an object", when i try to add anything to a sql database. i can create the database file but when i try to add a table or anything else to it i get that error. i tried uninstalling and reinstalling sql server express but it did not work. does anyone know how to fix this?
any help is greatly appreciated.
Thank you,
- Kyle
|
|
|
|
|
gr8coaster329 wrote: "Object reference is not set to an instance of an object",
You'll need to give us a snippet of code around the line where the exception occurrs. The error message means that something is set to null (or Nothing ) when it shouldn't.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
i did not enter any code for it. after adding the database to the project i tried to add a table to it by right clicking on tables under the database file in the database explorer window and selecting add new table and i get that error.
- Kyle
|
|
|
|
|
reinstalling visual basic express edition solved my problem.
thanks anyways for the help
- Kyle
|
|
|
|
|
Hello,
I'm a newbie using VB and SQL server Express editions. I have a windows forms application and a Web application that need to connect to the same database (Named WebCenter). But when I try to connect to it from the Web app while running the windows forms app this error message apears:
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\WebCenter_Data.MDF". Operating system error 32: "32(The process has no access to the file because is being used by another process).
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\WebCenter_Log.LDF". Operating system error 32: "32(The process has no access to the file because is being used by another process.)".
Cannot open database "WebCenter" requested by the login. The login failed.
Login failed for user 'CARLOS-PC\ASPNET'.
File activation failure. The physical file name "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\WebCenter_Log.LDF" may be incorrect.
Can anyone give me hand or point me in the right direction.
Thanks.
Pd. Please excuse my english.
Carlos.
|
|
|
|
|
Looks like your trying to open the db file directly rather than going through a ADO connection. You should be able to open almost unlimited connections to your SQL server.
Look at these for connection
http://www.codeproject.com/aspnet/SQLConnect.asp[^]
or search code project for "101 ADO"
Good luck and have fun
|
|
|
|
|
Hi Frank,
You were right. I was trying to open the same DB file twice. I had the DB attached to SQL Server Express from the Web application, but when I added the data source to my VB project the connection string tries to attach the DB file again. The only way around is to progamatically connect and retrive data from the DB without using VB Express Add New Data Source.. wizard.
Thanks for your help.
Carlos
|
|
|
|
|
How can I debug stored procedures under SQL-Server 2005. Setting breakpoint and so on....
Has anybody an idea?
Thank you!
|
|
|
|
|
Hi, I asked that same question like 100 times on this forum and got no answer!
Glad to see I'm not the only one with that problem!
To debug SQL2005 you must have Visual Studio 2005 installed. (May be a marketing gimmick, dunno)
In VS2005 open the Server Explorer,
Right Click on Data Connections, choose Add Connection...
After adding the connection choose your SPROC, right-click and select Step Into Stored Procedure.
I had to do this even using SQL2000, simply because I installed VS2005.
Unfortunately VS2005 doesn't debug too well, it freezez whenever I try to stop the debugging process and for certain SPROC it never even breaks in the code, it just executes the entire procedure!
THANKS BILL!!!
Hope you run into less trouble than I did!
Good luck!
you can't forget something you never knew...
|
|
|
|
|
Thank you for your response!
Under SQL2000 you should be able to debug stored procedures with queryanalyzer, but I was never able to set it up in right way.
I hoped that that they make steps forward in sql2005.
I will get vs2005 in a few weeks, then I will try.
Thank you!
|
|
|
|
|
hi all,
I am using SQL Server 2000. I have created a DB called 'ABC'.
but today I saw that SQL DB is in 'Suspect' Mode.
So can any one please tell me how to recover the DB?
I have a backup of suspected DB. But the problem is I can not delete/Detach the DB.
thanks in advance...
|
|
|
|
|
You could turn off SQL server and copy the backup file overtop of the existing one. That is how the place I work at now does it. You can do it from a cmd prompt.
cmd> net stop mssqlserver
cmd> <copy the file>
cmd> net start mssqlserver
Steve Maier, MCSD MCAD
|
|
|
|
|
I have one of my c# applications coded using .net framework 1.1, which works fine.
Recently I installed Visual Studio 2005 - Professional edition on the same machine
(Arter formating and reinstalling Windows 2000 with SP4) and now the above application
takes a long time to open the connection to SQL Server 7.
My connection string is as follows
"user id=sa;password=;initial catalog=FINISHED_GOODS_STOCK;data source=naturubmain;Connect Timeout=30"
Once I try to open the connection it gave me 'Time out expired' error. I set the 'Connect Time out' to 0
just to find how long does it take to open the connection. It took above 1 minute and opend the
connection.
Pls help me. Withot fixing this I will not be able to enjoy the new features of VS2005
|
|
|
|
|
It looks like your not getting a connection to your SQL server. YOu also might want to try and add an Instance name to your connection string.
"user id=sa;password=;initial catalog=FINISHED_GOODS_STOCK;data source=naturubmain\DEFAULT;Connect Timeout=30"
Try and create a test connection windows ODBC tool.
|
|
|
|
|
Thanks for your advice. Later I found the problem was with the name resolving of our network. I replaced the server name with the IP address of the server in the connection string and now its working fine.
|
|
|
|
|
scenario is as below:
1. Key in password "ADMIN" , save it in a encrpyted string , such as 'Dbsaba:+='
2. Login again with password "admin"
It's working in some server and doesn't in other server.
I wonder any where in MS SQL server will trigger this case sensitive checking.
Anyone got any idea on this?
Thanks in advance!
|
|
|
|
|
The collation sequence of the Server or column (if not using the server default) determines case sensitivity.
However, you are comparing encrypted strings, so it should always be case sensitive as a word in upper case will encrypt to a different value to the same word in lowercase.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Thanks, Colin! May i know how we can know that server or column been configured with case sensitivity? what is the command or steps?
For my case, I got no idea as both Upper case and lower case encrypted string are same. This value will passed to Stored Procedure. At server A, both (Upper & lower case) can pass the checking. While at Server B,Only 'ADMIN' can return correct value.
Thanks a lot!
|
|
|
|