Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Sunday, March 25, 2012

Connet to SQL using VB6 forms via Internet

We have one system that is developed using Visual Basic 6. The system connects to MS SQL database using ODBC configuration. We have another branch that has to access the same database. We've got an Internet connection with a speed of 2MB, as we tried to connect using Virtual Private Network (VPN), but the problem we faced that the system became very slow over the Internet, its taking half an hour to open one form. Is there any way to connect to the database and via the Internet using VB6 Forms? Or its not useful as its not a web based tool.

Hi,

it′s hard for us to tell where the bottleneck in your application design is. But as of your description the application is not designed for slow connections to the database. To find out exactly what your problem is, you will either have to through the code to see which data is requested from the server, or let the profiler runn to see where the latency is based on.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Connector between executables dissapears

Dear Forum Members.

I am currently using Visual Studio 2005: Business Intelligence Development Studio to create an Integration Services Package.

The package contains several containers, within each container there is a ‘foreach loop container’ and within the ‘foreach loop container’ there is a script component, execute component and another script component.

Each of the three components is connected together by single connectors.

My issue arises when I disable a container and then enable the container; the connectors between the components disappear (e.g. are not visible) but do exist as I can not create another connector between the components. When I attempt to create the connector again between the components I receive the error message. This tells me the connectors are present but not visible.

TITLE: Microsoft Visual Studio

Cannot create connector.
Only one workflow can exist between the same two executables.


BUTTONS:

OK

Can someone kindly explain why this is happening and how to resolve this issue?

I can not change the connector types from success to completion or vice versa because the connectors are not visible for me to select them.


Many Thanks

I have had this happen quite frequently. The only solution I found was to exit and restart BIDS.|||

Dave

Thanks very much for your response. The resolution works.

Regards

sqlsql

Thursday, March 8, 2012

Connection to Oracle

Hi,

I have created a simple report that reads data from Oracle within Visual Studio. I have no problem with previewing the report within Visual Studio. When I deploy the report to the Report Server (same machine) and try to open the report through Report Manager, I get the following error message:

  • An error has occurred during report processing.
  • Cannot create a connection to data source 'xxxx'.
  • System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.

    I am aware of the following issue that requires extra security to be assigned to the Oracle directories: http://support.microsoft.com/Default.aspx?kbid=870668

    Even after applying the Read/Execute access to the Network Service account that is running the Reporting Service, I still get the error message.

    Can anyone help me with the debugging of this issue?

    Thanks,

    Ben

    To me, that error could mean a couple of things, not necessarily just read/execute problems.

    Is the version of Oracle client equal to or greater than 8i? Do you have your Oracle homes set correctly (especially as you may have multiple clients installed on the same machine)? Did you propagate the read/execute permissions down the directory structure, including to the <oracle install dir>/network/admin folder and its contents? What account is IIS running under? Does your tns file have the correct entry in it? And lastly, are you running Win2K3 or a prior version - IIRC the NETWORKSERVICE account only started being used from 2K3 onwards, prior to that there may have been other identities that IIS and SSRS run under.

    HTH!

    |||Try updating the oracle client to 10.2.01|||

    Hi sluggy,

    I am currently running Windows XP Prof.

    On this machine, I have 3 different Oracle clients (8.1, 9.2, and 10). Read/Execute has been propagated to all 3 directories starting from each of the Oracle_Home directory.

    IIS (World Wide Web Publishing Service) is running under Local System.

    TNS is correct. Both Visual Studio and the Report Server are running on the same machine.

    How can you tell which Oracle Client the Reporting Service will use? I tried to direct it to Oracle 9.2 by modifying the both System Variables (ORACLE_HOME) and the registry (My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ORACLE_HOME=C:\ORACLE\ORA92). Neither of these seems to work.

    Thanks,

    Ben

    |||

    Hi ghw123,

    I currently have Oracle Client 10.2.1 on the machine. Unfortunately, I am not sure how to force the Report Service to use this client over the 2 clients that I have on the machine.

    Any suggestions?

    Thanks,

    Ben

    |||Make sure that the 10.2.01 client is listed first in the local enviroment variable 'Path'|||

    Hi ghw123,

    Thanks for your help. I think my problem is related to Oracle client installation.

    I have reinstalled everything on a separate machine and everything works fine when I apply the proper Read/Exec rights for the account running the Reporting Service.

    Thanks,

    Ben

  • Friday, February 24, 2012

    Connection String in ASP.NEt

    Hi

    I'm using VB.NET in ASP.NET .

    Windows 2000

    Visual Studio 2005

    and SQLServer 2005.

    I'm new to VS 2005

    I'm using the following code for connection

    <

    addkey="dsnstring"value="persist Security info=False; User ID=; password=;Initial Catalog=TransMate1; Data Source=Localhost trusted_connection=yes" />

    it is giving the error as 'Cann't do the connection since user id cann't be null

    It is not exact words of the error message.

    following code is working fine with the SQL Server 2003 but not with SQL Server 2005.

    <add key="dsnstring" value="persist Security info=False; User ID=sa; password=dreams;Initial Catalog=TransMate; Data Source=Localhost" />

    Kindly help me

    Thanks in advance

    Regards.

    If you use Trusted_Connection=yes that is, Windows Authentication, do not have userid or password in the connection string since they are dealed by the Windows authentication. You don't provide them in that case.

    <add key="dsnstring" value="Initial Catalog=TransMate1; Data Source=Localhost;trusted_connection=yes" />

    Connection string for VBEE to SQL 2005

    I have SQL 2005 and I wanted to write a little program in Visual Basic 2005 Express Edition (VBEE) to carry out some processes. While away I built my user form, but when I got back I found that VBEE refuses to connect to SQL Server 2005 and is only configured to link to SQL Express.

    The data source is set to .\SQLEXPRESS in the advanced properties of the Add Connection form in the Data Source Configuration Wizard and you can not change it.

    I read in MSDN ID 329721 that you can create a data layer that will allow you to use the wizards, but that is as far as it went and is above my programming skills.

    So my only options are use VB.Net 2003 Standard edition, use connected mode or give up and it was only supposed to be a quick fix. Had anyone else had this same issue and developed a work around?I have entered the following

    Imports System.Data.SqlClient
    Imports System.Data.OleDb
    Public Class Form1
    Public SQLPubsConnString As String = "Provider=SQLOLEDB;Data Source=TOTALLY-PBN-FS;Integrated Security=SSPI;Initial Catalog=Sword of Destiny Back End_Data.MDF"

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim cn As New OleDbConnection
    cn.ConnectionString = SQLPubsConnString
    cn.Open()

    End Sub

    and I get this error:

    Request for the permission of type 'System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

    I have no idea what this mean, I tried to connect to the help files and nothing, any clues would be appreciated|||Quick rant, why did Microsoft not include SQL 2005 within the Add Connection in VBEE, it is totally stupid?|||to connect to sql2005, you can use a connstr like this (assuming windows auth)

    server=MYSERVER; database=MYDB; trusted_connection=yes;

    many more examples here:
    http://www.connectionstrings.com|||Many thanks, I tried it and it asks for a provider, I then enter one and it comes up with the same message. I had already located that excellent site and I have tried various permutations and no joy. I am using Windows Authorization by the way.

    Sadly it looks like I will have to continue using my Access MDB front end that keeps getting ODBC timeouts which is not solvable.|||I worked out what it was while lying in bed, and sorted it this morning, it seems that as I had stored the project on a network drive it was tripping on security, as soon as I moved the project to My Documents the connection string worked, doh!!!|||you can store in your web.config



    <add key="ConnectionString"
    value="Server=(local);Database=yourDataBaseName;User ID=;Password=;Trusted_Connection=True"
    />

    the keywords (local) works for localhost|||Thanks for your advice I will remember that as I will be setting up something for the Web, in the end I did this:

    Public WithEvents cnn As New SqlConnection
    Public SQLPubsConnString As String = "data source=TOTALLY-PBM-FS;Initial Catalog=Sword of Destiny Back End;Integrated Sec

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim SQLGetControlFormData As String
    Dim SQLcommand As New SqlCommand

    SQLGetControlFormData = "Select ID, [Character Name], Month, Year From dbo.[Control Form]"

    cnn.ConnectionString = SQLPubsConnString
    cnn.Open()

    SQLcommand.Connection = cnn
    SQLcommand.CommandText = SQLGetControlFormData

    Dim DRControlForm As SqlDataReader = SQLcommand.ExecuteReader

    Do While DRControlForm.Read()
    Debug.WriteLine(DRControlForm.Item("ID"))
    combobox6.
    Loop

    DRControlForm.Close()
    SQLcommand.Dispose()

    I can see the data in the immediate window, so its there, my next challenge is to work out how to get the data into the Form. And to do something like this which I Was doing in Access:

    ' GetUnitIDSQL = "SELECT [Unit Details].ID, [Unit Details].[Unit Name], [Unit Details].[Unit Type], [Unit Details].[Paid By], [Unit Details].Country, " & _
    ' "[Unit Details].[Province based], [Unit Details].[Training Level], [Unit Details].[Location], [Unit Details].[Wages PM] " & _
    ' "FROM [Unit Details] " & _
    ' "WHERE ((([Unit Details].[ID])=" & UNitID & ") AND (([Unit Details].[Unit Type])=" & "'" & UnitType & "'" & ") " & _
    ' "AND (([Unit Details].[Paid By])=" & CharID & ") AND (([Unit Details].Country)=" & "'" & Country & "'" & ") AND (([Unit Details].[Province based])=" & "'" & Province & "'" & "));"

    ' qdf2 = db.CreateQueryDef("Hewitt5734", GetUnitIDSQL)
    ' rs2 = db.OpenRecordset("Hewitt5734", Type:=dbOpenSnapshot)

    ' With rs2
    ' CountB = .RecordCount
    ' If CountB = 1 Then

    ' UnitName = .Fields("Unit Name")
    ' WagesPM = .Fields("Wages PM")
    ' StartSector = .Fields("Location")

    ' End If

    ' End With

    ' 'db.OpenRecordset("Hewitt5734").Close

    ' db.QueryDefs.Delete("Hewitt5734")

    I do not intend to change any data I bring into the form, I want to use an Update SQL Query at the end to add new records in another table and update certain related records in another Table. As I can't use disconnected mode with this which is with the Wizards working of course then I have to use connected mode.

    Connection String for SQL Server not working

    I have the Visual Studio 2005 Team Suite trial version and the SQL Server 2005 trial (which came with team suite) installed in my machine.

    When I installed the SQL Server 2005 I installed it in the Windows Authentication mode. So every time I open SQL Server 2005 it doesnt ask for Username/Password (Its greyed out). The only thing available were:

    Server Type: Database Engine

    ServerName: ServerSue

    Authentication: Windows Authentication.

    Here is my Problem:

    I created a small application in C#. In the web.config file I created the following:

    <

    appSettings>

    <

    addkey="resumecon"value="SERVER=ServerSue;database=Resume;"/>

    </

    appSettings>

    Then in the Code behind I created the following string:

    string

    strResCon =ConfigurationManager.AppSettings["resumecon"].ToString();

    Then in method (for a Login page) I created the connection string as follows and wrote code to insert some values into the Resume database. I called this method on a button click event.

    SqlConnection

    conLogin =newSqlConnection(strResCon);

    When I run the page and when I click the button I get the following error:

    Login failed for user ''. The user is not associated with a trusted SQL Server connection.

    I think some thing is wrong in the addkey of webconfig? How do I change this?

    You have set the database for Windows Authentication but the user account accessing the database does not have permission to it. You need to know thw account used to access the database, which would be the ASP.NET Process account unless you're authenticating or impersonating. Grant that account access to the database or place it in a Windows group that has access.

    Or use SQL Authentication.

    Jeff

    |||

    Thanks Jeff. I am too new to SQL Server 2005. I have been using asp.net for the last 5 months and used SQL Server 2000 before.

    I didnt quite understand what you mentioned. So is it safe for me to uninstall SQL Server 2005 and install it back with server authentication with a username and password? In that way I can specify the usaname password in the string

    Because in the past with SQL Server 2000, I had some virus attack in my machine.

    |||

    You can use SQL either way, you just need to provide the correct authentication for it. Take a look atwww.connectionstrings.com for options in connecting to SQL, and the documentation for using Windows Authentication. In many cases I would recommend reconfiguring and using SQL Authentication, especially for beginners since most examples assume it, but it's really your choice.

    Jeff

    |||Thanks so much Jeff. I still havent got the time to do it. I am going to do this weekend and if things go wrong, (rarely I would say), I might post a question here.|||

    I am back again. I uninstalled SQL Server 2005 and tried to re install it. But got stuck. When I got the window which says Instance name, there were 2 radio buttons: default instance and named instance.

    I clicked the default instance radio button. Is this correct?

    In the next window, Service Account window again there are 2 radio buttons:

    1. Use the built-in service account radio button. This has a drop down with Local System and Network Service.

    2. Use a domain user account radio button which is asking for user name, password, and domain.

    Which one should I choose? I chose the second one and gave a username and password. But didnt know what to give for Domain name. Also I got an alert window saying some thing about my user name password not correct or so.

    Sunday, February 19, 2012

    connection string error

    OK - I have seen lots posted on this, but the behavior is very strange, and I am trying to understand:

    I am using Visual Basic 2003 with SQLEXPRESS 2005 to connect to a database and to develop a desktop application. My connection string is:

    Conn_Str = "Data Source=.\SQLExpress;AttachDbFilename=" & _
    Directory.GetCurrentDirectory & "\CWW.mdf;" & _
    "Trusted_Connection=Yes;"
    I get the following error:

    "An attempt to attach an auto-named database for file C:\Documents and Settings\Brian\My Documents\Compressor Program Development\bin\CWW.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

    However, if I copy the database to anywhere else on the "c:\" drive, the connection works, as in the following:

    Conn_Str = "Data Source=.\SQLExpress;AttachDbFilename=" & _
    "C:\temp\CWW.mdf;" & _
    "Trusted_Connection=Yes;"

    What I have found is that ist works everywhere on my computer except in the following location:

    "c:\documents and settings\Brian", which includes My Documents, Desktop folders.

    Why is this?

    Any help would be great - I can work around this by moving my development folder to the "c:\" drive. Since my ultimate application directory will be the "Program Files" directory I should be fine.

    hi,

    bridress wrote:

    Conn_Str = "Data Source=.\SQLExpress;AttachDbFilename=" & _
    Directory.GetCurrentDirectory & "\CWW.mdf;" & _
    "Trusted_Connection=Yes;"

    did you try "AttachDbFilename=|DataDirectory|\CWW.mdf;" ?

    regards

    |||Thanks for the response -

    Yes I did - I even tried the following to shift the default DataDirectory:

    AppDomain.CurrentDomain.SetData("DataDirectory", Directory.GetCurrentDirectory)

    Proj_ConnStr="DataSource=.\SQLExpress;AttachDbFilename=|DataDirectory|\CWW.mdf; _ Trusted_Connection=Yes;"

    I still had no success. It seems I should be able to put the db file in any directory I choose and not be restricted like this?

    |||

    hi,

    please verify the Windows account running the SQLExpress is granted enought NTFS permissions on the specified path...

    regards

    |||

    The first time you run your code it attaches the database and used the path provided as the Name of the database. You will get failures in subsequent attempts because the database is already attached unless you have detached the database somewhere else in your code.

    AttachDbFilename is mostly useful when working with User Instances, which you're not using, so I'm unclear why your're using this keyword. Why aren't you just attaching your database once and then connecting to it normally?

    Mike

    connection string error

    OK - I have seen lots posted on this, but the behavior is very strange, and I am trying to understand:

    I am using Visual Basic 2003 with SQLEXPRESS 2005 to connect to a database and to develop a desktop application. My connection string is:

    Conn_Str = "Data Source=.\SQLExpress;AttachDbFilename=" & _
    Directory.GetCurrentDirectory & "\CWW.mdf;" & _
    "Trusted_Connection=Yes;"
    I get the following error:

    "An attempt to attach an auto-named database for file C:\Documents and Settings\Brian\My Documents\Compressor Program Development\bin\CWW.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."

    However, if I copy the database to anywhere else on the "c:\" drive, the connection works, as in the following:

    Conn_Str = "Data Source=.\SQLExpress;AttachDbFilename=" & _
    "C:\temp\CWW.mdf;" & _
    "Trusted_Connection=Yes;"

    What I have found is that ist works everywhere on my computer except in the following location:

    "c:\documents and settings\Brian", which includes My Documents, Desktop folders.

    Why is this?

    Any help would be great - I can work around this by moving my development folder to the "c:\" drive. Since my ultimate application directory will be the "Program Files" directory I should be fine.

    hi,

    bridress wrote:

    Conn_Str = "Data Source=.\SQLExpress;AttachDbFilename=" & _
    Directory.GetCurrentDirectory & "\CWW.mdf;" & _
    "Trusted_Connection=Yes;"

    did you try "AttachDbFilename=|DataDirectory|\CWW.mdf;" ?

    regards

    |||Thanks for the response -

    Yes I did - I even tried the following to shift the default DataDirectory:

    AppDomain.CurrentDomain.SetData("DataDirectory", Directory.GetCurrentDirectory)

    Proj_ConnStr="DataSource=.\SQLExpress;AttachDbFilename=|DataDirectory|\CWW.mdf; _ Trusted_Connection=Yes;"

    I still had no success. It seems I should be able to put the db file in any directory I choose and not be restricted like this?

    |||

    hi,

    please verify the Windows account running the SQLExpress is granted enought NTFS permissions on the specified path...

    regards

    |||

    The first time you run your code it attaches the database and used the path provided as the Name of the database. You will get failures in subsequent attempts because the database is already attached unless you have detached the database somewhere else in your code.

    AttachDbFilename is mostly useful when working with User Instances, which you're not using, so I'm unclear why your're using this keyword. Why aren't you just attaching your database once and then connecting to it normally?

    Mike

    Sunday, February 12, 2012

    Connection Problem, MS Personal Website Starter Kit

    I have had a local Website up and running based on the MS Personal Website Starter Kit using Visual Studio 2005 Professional and SQL Server Express.

    I am now trying to get the databases to run on SQL Server 2005 Standard Edition but can't get the connection to work.

    I have changed the connection string in the Web.Config file from:

    connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient"

    To

    connectionString="Data Source=.\scastle;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient"

    But am getting the following error:

    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    Source Error:

    Line 5: Sub Application_Start(ByVal sender As [Object], ByVal e As EventArgs)

    Line 6: AddHandler SiteMap.SiteMapResolve, AddressOf Me.AppendQueryString

    Line 7: If (Roles.RoleExists("Administrators") = False) Then

    Line 8: Roles.CreateRole("Administrators")

    Line 9: End If

    I am able to connect OK in both Server Management Studio (Server Name: SCastle, Windons Authentication) and clicking Connect to Database in Server Manager in Visual Studio (Server Name: (local)).

    Have I got the connection string wrong or do I need to set up additional permissions in the database?

    Thanks for your help.

    Stephen

    Hi,

    the user instance feature only work with the Sql Server Express Edition. If you want to use the database with the Standard edition you will have to attach the database to the Server instance (to make it server controlled) and then change the connectionstring to the following (assuming that the local server holds an instance of the name scastle)

    connectionString="Data Source=.\scastle;Integrated Security=True;Initial Catalog=YourDBnameafterattachment providerName="System.Data.SqlClient"

    HTH, Jens K. Suessmeyer.

    http://www.sqlserver2005.de

    |||

    Jens

    Thanks for the response. I have tried adding the following in line with your advice but still get the same error:

    <connectionStrings>

    <add name="Personal" connectionString="Data Source=.\scastle;Integrated Security=True;Initial Catalog=Personal" providerName="System.Data.SqlClient"/>

    <remove name="LocalSqlServer"/>

    <add name="LocalSqlServer" connectionString="Data Source=.\scastle;Integrated Security=True; Initial Catalog=ASPNetDB"/>

    </connectionStrings>

    Any idea what is wrong?

    Thanks

    Stephen

    |||You should then also check of you enbled remote connections (see the screencast on my site for more information)

    Jens K. Suessmeyer.

    http://www.sqlserver2005.de
    |||

    Thanks again Jens.

    Problem has been solved by changing Data Source from ".\scastle" to "(local)".

    Stephen

    Friday, February 10, 2012

    Connection Problem using the SQLClient Driver

    I can create a Data Source in Visual Studio (BIDS) using the OLE DB Provider for Analysis Services 9.0 Provider without error. However, when I try to use the .NET SqlClient Provider, I cannot access any databases running under Analysis Services.

    With the .NET Provider selected, I enter the server name. When I go to select a database name, only my SQL Server Databases populate the drop down list. If I manually enter the Analysis Server dB, I get a log in error.

    Is there some configuration I need to set to allow the .NET Driver access to my Analysis Services databases?

    Use ADOMD.NET .NET object model to access Analysis Services.

    Edward.
    --
    This posting is provided "AS IS" with no warranties, and confers no rights

    Connection problem OSQL - MSDE

    Hello All
    I have recently installed MSDE to use with
    a trial version of Visual Studio .NET 2003
    I installed MSDE 2000 release A with the following command:
    Setup.exe /qb+ INSTANCENAME=3D"NetSDK" DISABLENETWORKPROTOCOLS=3D1
    SAPWD=3D"notthisone"
    I now have to install a database to be used in exercises
    that is installed through a bat file:
    rem The following command line installs the Contact SQL database
    osql -E -i InstContacts.Sql
    osql.exe refused to connect with sqlserver. It should communicate
    using shared memory but that fails.I have enabled tcp/ip and named
    pipes (which are disabled by default) using the Server Network Utility
    but that did not work either. It usually fails with the following
    messages:
    [Shared Memory]SQL Server does not exist or access denied.
    [Shared Memory]ConnectionOpen (Connect()).
    With tcpip enabled it gives the messages
    [Shared Memory]Invalid connection.
    [Shared Memory]ConnectionOpen (Invalid Instance()).
    after running ther TDIMON utility (www.sysinternals.org)
    I get the first error message,
    TDIMON seems to screw up some tcpip related settings as I encounter
    other problems connecting with ADSL with a ethernet card.
    (Could this be causing confusion for OSQL?)
    The messages suggest to me that it is using shared memory also
    when TCPIP is available.
    I have no control over the communications by OSQL,
    there seem to be no switches to control it.
    I tried several solutions I found in this group and on
    a Microsoft site, but none worked so far.
    I have one named instance NETSDK of SQL server (desktop engine)
    I am running Windows 2000 with
    Norton Internet Security 2002
    computer/instance=3DSTARSHIP\NETSDK
    instance name=3DMSSQL$NETSDK
    some version info: 'SSNETLIB.DLL' version '8.0.766'.
    I think I have MDAC 2.7 when looking in the registry
    Does anyone has an idea what is wrong?
    Martin Kramer
    mkramer@.wxs.nl
    http://home.wxs.nl/~mkramer/
    hi Martin,
    Martin Kramer wrote:
    > rem The following command line installs the Contact SQL database
    > osql -E -i InstContacts.Sql
    please add the full instance name ...
    osql -E -S(Local)\NetSDK -i InstContacts.Sql
    Andrea Montanari (Microsoft MVP - SQL Server)
    http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
    DbaMgr2k ver 0.12.0 - DbaMgr ver 0.58.0
    (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
    interface)
    -- remove DMO to reply
    |||"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote:

    >hi Martin,
    >Martin Kramer wrote:
    >please add the full instance name ...
    >osql -E -S(Local)\NetSDK -i InstContacts.Sql
    Thanks a lot
    It certainly worked much bettert than anything I tried
    There is a database created. I only have doubts about the
    access rights for the ASPNET user that the selfstudy samples use.
    But this was syntax from microsoft. It should have worked
    as it came with the samples. Or has anything gone wrong
    initially when osql searches for a database server?
    There is only one on my system.
    I copied the original bat file to a new one,
    adding a pause statement to see the feedback,
    because the original flashed away before I could have a look at it.
    It seems the problem was not with TCPIP after all,
    However, I can not get osql into a command promt mode with
    the same syntax. Is that possible and if so, how.
    Oracle and DB2 had similar functions.
    Or is osql not intended/suitable for such use?
    Martin Kramer
    mkramer@.wxs.nl
    http://home.wxs.nl/~mkramer/
    |||hi Martin,
    Martin Kramer wrote:
    > But this was syntax from microsoft. It should have worked
    > as it came with the samples. Or has anything gone wrong
    > initially when osql searches for a database server?
    > There is only one on my system.
    without specifying the destination server, the (Local) server is assumed,
    but as long you installed a named instance you have to full qualify it..

    > I copied the original bat file to a new one,
    > adding a pause statement to see the feedback,
    > because the original flashed away before I could have a look at it.
    > It seems the problem was not with TCPIP after all,
    Shared Memory is used instead of network protocol(s) to connect to local
    server..

    > However, I can not get osql into a command promt mode with
    > the same syntax. Is that possible and if so, how.
    > Oracle and DB2 had similar functions.
    > Or is osql not intended/suitable for such use?
    are you using the one I proposed?
    http://msdn.microsoft.com/library/de..._osql_1wxl.asp
    http://support.microsoft.com/default...;EN-US;q325003
    Andrea Montanari (Microsoft MVP - SQL Server)
    http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
    DbaMgr2k ver 0.12.0 - DbaMgr ver 0.58.0
    (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
    interface)
    -- remove DMO to reply
    |||"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote:

    >hi Martin,
    >Martin Kramer wrote:
    >without specifying the destination server, the (Local) server is =
    assumed,=20
    >but as long you installed a named instance you have to full qualify it..
    I understand. Having a named instance requires specifying it.
    >
    >Shared Memory is used instead of network protocol(s) to connect to local=
    =20
    >server..
    OK. Seems logical as it should be efficient.
    >
    >are you using the one I proposed?
    >http://msdn.microsoft.com/library/de...y/en-us/copro=
    mpt/cp_osql_1wxl.asp
    >http://support.microsoft.com/default...;EN-US;q325003
    I don't understand this question, as you are proposing it only now,
    but I found the links very helpful and now have osql.exe running in
    command promt mode so I can try all kinds of commands.
    This was what I was looking for.
    You have been very helpful
    Thank you.
    Martin Kramer