This is the forum to discuss the Wrox book Professional Visual Basic 2010 and .NET 4 by Bill Sheldon, Billy Hollis, Kent Sharkey, Gaston Hillar, Rob Windsor, Jonathan Marbutt; ISBN: 9780470502242
You are currently viewing the BOOK: Professional Visual Basic 2010 and .NET 4 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I cannot get the examples.bat file to run. My College instructor has the same problem. The error that I get is:
C:\Documents and Settings\Tscherb1\Desktop\Wrox Book Files>osql -E -n -i example
s.sql
[SQL Server Native Client 10.0]Named Pipes Provider: Could not open a
connection to SQL Server [2].
[SQL Server Native Client 10.0]Login timeout expired
[SQL Server Native Client 10.0]A network-related or instance-specific error
has occurred while establishing a connection to SQL Server. Server is not
found or not accessible. Check if instance name is correct and if SQL Server
is configured to allow remote connections. For more information see SQL Server
Books Online.
What is the instance name of your SQL Server? The examples.bat is set up to not use an instance, but if you're just using SQL Express, you'll need to update the call to osql to include this instance. Something like:
Kent thanks for your reply. That worked but now I have a new message:
C:\Documents and Settings\Tscherb1\Desktop\Wrox Book Files>osql -E -S .\SQLEXPRE
SS -n -i examples.sql
Msg 2715, Level 16, State 7, Server TSCHERB1-60825B\SQLEXPRESS, Line 1
Column, parameter, or variable #1: Cannot find data type dbo.id.
Msg 4902, Level 16, State 1, Server TSCHERB1-60825B\SQLEXPRESS, Line 2
Cannot find the object "dbo.authors_bulk_copy" because it does not exist or you
do not have permissions.
Msg 4902, Level 16, State 1, Server TSCHERB1-60825B\SQLEXPRESS, Line 1
Cannot find the object "dbo.authors_bulk_copy" because it does not exist or you
do not have permissions.
C:\Documents and Settings\Tscherb1\Desktop\Wrox Book Files>pause
Press any key to continue . . .
Do you also already have pubs installed into that instance of SQL Express?
Also, does your user account have rights to create tables in that instance? (it should have if you installed it, but in a classroom it might not.) If you normally connect to SQL Express using a different user account (like sa), you can change that command-line. It's currently set up to access SQL Server using your credentials (the -E parameter), but you can set it to use another: