How do I connect to an SQL Server Database from CR XI?

Hello All,
I posted previously to this forum but did not get any response. There surely must be a way to connect to SQL Server from CR XI? My problem is that I keep on getting prompted for a PW or get a message saying "Logon Failed"
Please see my earlier post, with code sample, on Page 4 (or now 5 or 6 .....)
"How to log on to SQL 2000 programmatically using VB6 RDC and CR XI "
I would really appreciate a response from someone as I need to get some pressing work finished for a client.
Thanks so much in advance
Peter Tyler

This shoul dbe posted to the Legacy Development forums

Similar Messages

  • How to create a .mdf SQL Server database from a Data-Tier Application file that has data?

    This is a noob question, though I do use SQL Server databases all the time with Entity Framework when I code in C# using Visual Studio 2013.  The development environment is found below at [A].  I am trying to make a clone of a SQL Server 2008 R2
    database (.mdf)  that exists online.  I can read, connect and work with this database in Visual Studio 2013, but I wish to make a local copy of the database, as an .MDF file.  Somewhere in my notes I have a way of creating a local copy from
    an online database when using Visual Studio but I forgot how (it seems, reviewing my notes, that it deals with ADO.NET which is deprecated in Visual Studio 2013 these days, or so it seems).  So I'm looking for another way.  What I did was create
    (or export) a "Data-Tier Application File" from the online SQL Server database, with data, and it seems to have worked in that this Data-Tier Application file exists on my hard drive and seems to have data in it ("SQL Server Replication Snapshot"
    is the format it seems).  It contains skeleton code to create a database, but when I tried to execute it with SQL Server 2014 Management Studio, I got a bunch of errors.
    So my question is:
    1) Can I somehow create a .MDF SQL Server Database from an Data-Tier Application file that has data?  What tool do I use?  I saw this link, http://social.technet.microsoft.com/wiki/contents/articles/2639.how-to-use-data-tier-application-import-and-export-with-a-windows-azure-sql-database.aspx 
    and it relates to Azure, but is there a tool for C#Visual Studio 2013, standalone?
    2) If there's an easy way to create a .mdf SQL Server Database file from an online file, within SQL Server Management Studio?  I don't think so, since it would require Administrator permissions on the online server, which I don't have. I have permission
    to read, update, delete the online database file, but strangely not to download it (the service I use has a tool for backup, but not for download).
    3) same question as 2), but for Visual Studio 2013?  I don't think so, since I notice none of the templates even mentions ADO.NET anymore, but instead they go with Entity Framework.  Using EF I can of course do anything I want with the online database
    (CRUD), but it remains online.  Maybe there's a switch to make a local copy?  I guess I could write a short program to suck all the data out of the online database and put it into a new, duplicate database having the same tables, that I create on
    my localhost, but my question here is if there's an easier way than this, maybe a tool or command I can run from inside Visual Studio?
    Any advice on any of the above questions is appreciated.
    Thank you,
    Paul
    [A] Microsoft Visual Studio Professional 2013
    Version 12.0.21005.1 REL
    Microsoft .NET Framework
    Version 4.5.51641
    Microsoft Web Developer Tools 2013   2.0.40926.0
    SQL Server Data Tools   12.0.30919.1
    Microsoft SQL Server Data Tools
    Windows Azure Mobile Services Tools   1.0
    Windows Azure Mobile Services Tools

    Thanks but these links are too general to help.
    "2. what do you mean by online file?" - I mean the SQL Server database file is on a remote web server that I rent from, but I am not the administrator of.  I can access my database using SQL Server Authentication, but nothing more.
    Paul
    What do you mean by too general? It explains on how you can use data tier application to create and deploy databases
    May be this will help you to understand better
    http://www.databasejournal.com/features/mssql/article.php/3911041/Creating-Data-Tier-Applications--in-SQL-Server-2008-R2.htm
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Best practise for creating an application that connects to a SQL Server database

    I have created an application that connects to a SQL Server database and views information using a datagrid and performs several updates when a button
    is selected.  
    I have created a SQLcontrol.vb using the following code:
    Imports System.Data.Sql
    Imports System.Data.SqlClient
    Public Class SQlControl
    'connection 1
        Public SQLCon As New SqlConnection With {.ConnectionString
    = "Data Source=;Initial Catalog=;Integrated Security=True"}
    'connection 2
        Public SQLCon1 As New SqlConnection With {.ConnectionString
    = "Data Source;Initial Catalog=;Integrated Security=True"}
        Public sqlcmd As SqlCommand
        Public sqlda As SqlDataAdapter
        Public sqldataset As DataSet
        Public Function hasconnection() As Boolean
            Try
                SQLCon.open()
                SQLCon.close()
                Return True
            Catch ex As Exception
                MsgBox(ex.Message)
                Return False
            End Try
        End Function
        Public Sub runquery(query As String)
            Try
                SQLCon.Open()
                sqlcmd = New SqlCommand(query,
    SQLCon)
                'LOAD
    SQL RECORDS FOR DATAGROD
                sqlda = New SqlDataAdapter(sqlcmd)
                sqldataset = New DataSet
                sqlda.Fill(sqldataset)
    BH READ DIRECTLY FROM THE DATABASE
                'Dim
    R As SqlDataReader = sqlcmd.ExecuteReader
                'While
    R.Read
                'MsgBox(R.GetName(0)
    & ": " & R(0))
                'End
    While
                SQLCon.Close()
            Catch ex As Exception
                MsgBox(ex.Message)
                'will
    close connection if still open
                If SQLCon.State
    = ConnectionState.Open Then
                    SQLCon.Close()
                End If
            End Try
        End Sub
        Public Sub runquery1(query As String)
            Try
                SQLCon1.Open()
                sqlcmd = New SqlCommand(query,
    SQLCon1)
                'LOAD
    SQL RECORDS FOR DATAGROD
                sqlda = New SqlDataAdapter(sqlcmd)
                sqldataset = New DataSet
                sqlda.Fill(sqldataset)
    BH READ DIRECTLY FROM THE DATABASE
                'Dim
    R As SqlDataReader = sqlcmd.ExecuteReader
                'While
    R.Read
                'MsgBox(R.GetName(0)
    & ": " & R(0))
                'End
    While
                SQLCon1.Close()
            Catch ex As Exception
                MsgBox(ex.Message)
                'will
    close connection if still open
                If SQLCon1.State
    = ConnectionState.Open Then
                    SQLCon1.Close()
                End If
            End Try
        End Sub
    End Class
    A code for one of my button which views displays data grid contains the following code:
    Private Sub Button1_Click_1(sender As Object,
    e As EventArgs) Handles Button1.Click
            If SQL.hasconnection
    = True Then
                SQL.runquery("select 
    * from tablea")
                If SQL.sqldataset.Tables.Count
    > 0 Then
                    DGVData.DataSource = SQL.sqldataset.Tables(0)
                End If
            End If
        End Sub
    I am fairly new to vb.net and have read a few books and followed a few tutorials on youtube, what I would like to know is, are there any disadvantages
    to the way I have connected to a SQL database using the SQLControl.vb.  A lot of the vb books include data adapter and dataset within the form, I'm not sure if I'm following best practice by have the connection details outside of the form.
    My other question is, I have created two connections in the SQLControl and call these connections within the same form using the same data adapter
    and dataset.  It all works fine but I just wanted to know of any potential issues?
    Public SQLCon As New SqlConnection With {.ConnectionString
    = "Data Source=;Initial Catalog=;Integrated Security=True"}
    'connection 2
        Public SQLCon1 As New SqlConnection With {.ConnectionString
    = "Data Source;Initial Catalog=;Integrated Security=True"}
    Thanks

    My other question is, I have created two connections in the SQLControl and call these connections within the same form using the same data adapter and dataset.  It all works fine but
    I just wanted to know of any potential issues
    1) You are not using Sepration of concerns for a solution that is doing data access, like using a DAL.
    http://en.wikipedia.org/wiki/Separation_of_concerns
    2) You are directly issuing SQL commands at the UI, leading to sql injection attacks.
    3) You are not using a UI design pattern, which leads you to tightly couple database activity to the UI.
    http://www.codeproject.com/Articles/228214/Understanding-Basics-of-UI-Design-Pattern-MVC-MVP
    @System243trd, parameters are important to prevent SQL injection attacks (people will insert SQL commands into the database if you do not perform basic checking of what you are passing to the database). If you write a stored procedure try to make
    the variables the correct SQL server data type to avoid problems later of people trying to call it directly.  Darnold924 is right, I see no code to prevent against SQL injection attacks. In addition, during development in some instances LocalSQLDB
    database system is used and during deployment you usually need to use the production SQL server database. Moreover,  Linq-to-SQL is used on Windows Phone 8.1 and it is required for phone development later and so I highly recommend learning
    it if you plan on developing windows phone applications.
    @System243trd, If you want the code for the windows phone app I think it uses the MVVM model or that might be for universal apps or regular windows phone apps. I have been using the windows phone Silverlight pivot or panorama template (it might
    be pieces of both). I've already submitted to the windows phone marketplace and it had to go through certification first. I plan on later making an article on it but I need to first fix one or two simple problems I have with it.  Here's a link to
    the source code if you later want to look at the source code (in vb.net): 
    https://jeffsblogcodesamples.codeplex.com/downloads/get/1445836
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - Sherlock Holmes. speak softly and carry a big stick - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda. Blog
    - http://www.computerprofessions.us

  • Connect a Microsoft SQL Server Database with eclipse

    Hi all,
    I am having problem to connect a Microsoft SQL Server Database with eclipse. Is it possible to do it? And could someone explain me how, please? When I want to create a connection from the data source explorer, I have in the list of connection only derby and jdbc. Is anything else that I have to download?
    Thank you in advance for your help.

    Just choose generic JDBC and locate/specify the driver yourself. Exactly the same as you would use when you wrote JDBC code yourself.

  • Error message when trying to connect to a SQL Server Database

    All:
    I get the following message when I try to connect to a SQL Server Database within a form:
    "Connection for Source DataConnection failed because the environment is not trusted"
    Can anyone help me solve this problem?
    Thanks,
    BR

    Hi Brian,
    In Acrobat, security concerns dictate that you cannot specify an ODBC connection string by using the Driver=; syntax. Therefore, the client computer using the form needs to have a DSN pre-configured for ODBC connections.
    Denver
    Adobe Enterprise Developer Support

  • Can dw cs3 connect directly to sql server database without a testing server?

    I'm new to dreamweaver but have used script tools that link
    directly to my sql server database.
    Not in dw, so far. As of this early stage, I don't have or
    want to use a web server, and it's blocking me
    without one. I just want to prototype without a testing
    server, directly to my database. And while I'll try php
    later, I didn't want to have to get into it or cold fusion,
    etc. right away.
    Can dw connect directly to sql server database without a
    testing server?
    I'm running XP sp 3 at this point, and don't see IIS. There's
    probably some security issues
    I'll have to tangle with. The goal is for my website to end
    up on the company intRAnet, not the www.
    fwiw, I can Build in Data Link Properties and get a
    successful test to my sql server database via
    Microsoft Data Link, but once I go back and try the test in
    OLE DB Connection it balks on the testing server,
    as I don't have one locally or otherwise. Isn't there a way
    to link to db without a testing server?
    Thanks for any insights.

    Art wrote:
    > You can connect to SQL server using ODBC in windows.
    Yes, you can. However, Dreamweaver's PHP server behaviors
    work only with
    MySQL. To connect to any other database, you need to hand
    code
    everything yourself.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Connecting to a SQL Server Database

    Can someone please point me to a guide or tutorial that
    explains the basics for connecting to an SQL Server Database. I'm
    just installed Coldfusion Developer Edition and Microsoft SQL
    Server Studio Express on Windows Professional. Do I go into the
    administration section of Coldfusion to add the database so that
    the datasource can then be used in my Coldfusion application? What
    other steps are there?

    Briefly,
    1. Create the database using SQL Management Studio Express.
    2. Set up your MSSQL security by following the tricks in
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=kb400255
    3. Go to ColdFusion administration and create the datasource,
    as you suspected. Enter T30\SQLEXPRESS as the server, where T30 is
    your windows computer name (obviously different, unless your naming
    conventions and the choice of laptop matches exactly mine ;-). Your
    SQLEXPRESS instance name might also differ, but that's the default
    I guess.
    4 That's it, you're ready to go.
    5. If things don't still work, start the SQL Server Browser.
    (It's a Windows service installed by MSSQL Server). I haven't
    figured out quite what this does, but it solved the problem for me.

  • Connecting to a sql server database using netbeans 5.5

    hi all
    if you please could any body tell me detailed steps for establishing a connection to a sql server database using netbeans 5.5
    i need to know what driver to use and the format of the url i use in making a new connection
    thanks

    Uhm SQL (Structured Query Language) is like the base
    of all other type like MySQL and Oracle. Um, given the context I think the person was referring to "Microsoft SQL Server". Sometimes people will cut to the chase and refer to the product as "SQL". At those times it's understood by all parties that we're not talking about the query language, rather the Microsoft product.
    I think this is one of those times.
    See
    something i found in two seconds with the wonder of
    google http://sqlzoo.net/ & http://sqlzoo.net/w.htm
    It's commendable that you're using Google. I'd argue that the OP should be making better use of it, too. But I don't think your response is applicable to this context. JMO, of course.
    %

  • I want to query sql server database from oracle

    i want to query sql server database from oracle
    can anyone help me in this regard

    First of all - you are in the wrong forum.
    Look either for the Database general or search for Transparant / Heterogenous Gateways.
    cu
    Andreas

  • How can i connect to a SQL Server 2000 database usgin JSP?

    I need (URGENT) to connect to SQL Server 2000 databse using JSP. I do not know how to program using JSP, so if anyone has any code snippet please let me see it. What i need is to give my site some login/password security.
    Anyone?
    Thx.

    just create an ODBC of your database from control pannel -> administrative tools -> data sources (ODBC) ,double click it .....
    go to the tab SYstem DSN , click on ADD button. select the driver for your connection. it will be the last one in the list "SQL Server".
    click Next then give ur DSN name there, description and Server Name , on next give your username and password of SQL server. when it will be connected to the server celect your database from there and hence there will be an ODBC bridge same as in case of MS Access.
    code for connecting to ODBC is
    // DSN-NAME same as in System DSN.
    // username and password are of your databse
    try
              url = "jdbc:odbc:DSN-NAME";
              Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
              connect = DriverManager.getConnection( url,"username","password" );
              catch ( ClassNotFoundException cnfex ) {
                        setErrorMsg( cnfex.getMessage() );
              catch ( SQLException sqlex ) {
                        setErrorMsg( sqlex.getMessage() );
              catch ( Exception ex ) {
                        setErrorMsg( ex.getMessage() );
    Now you are connected to the SQL Server ..... use connect object for further processing .........

  • Connect SharePoint to SQL Server Database Then Build Rules Based Returns System

    Hello Guys,
    I work for an ecommerce business. We sell a wide range of products to customers all around the world which are ordered from our websites and then dispatched to our customers from our warehouses.
    I have been tasked with developing a computerised return system from the company because at the moment everything is done using paper forms.
    We have all our customer, order and product data within SQL Server databases.
    What I would like to know is...
    1. Can we connect sharepoint online to a local sql server database
    2. Could we then build searches within sharepoint to display data contained within these databases e.g. customer information etc
    3. How is the data presented in sharepoint - is there a way to design how the data is displayed within sharepoint etc?
    4. Can we then build a rules based return system within sharepoint? The on screen workflow would need to vary according to data contained within the database e.g. the weight if the product being returned and also on fields input by the service agent such
    as the reason for the return, what solution the customer would like etc.
    5. is it possible to build these workflows in such a way that they can be saved part way through then gone back to later
    6. Can reports be build based on the returns that are being generated e.g. list of products most commonly returned
    Sorry for all the questions, I am a bit of sharepoint novice. I think it may possible be able to do what we need but I just wondered if the answer to any of the above questions is definately a no because if it is that could mean it is not suitable
    Thanks

    You could use a BCS connection
    http://community.office365.com/en-us/b/office_365_community_blog/archive/2012/10/11/business-data-connectivity-services-in-office-365-sharepoint-online.aspx, this will allow you to edit data in your non SharePoint SQL DB, on premises, from Office 365 SharePoint.
    Search will index the web applications you point it at, and the lists from the BCS will be part of those web apps, site collections, sites at some place and will get indexed. 
    You can create views on the data, that can sort of work like a search, but when you search on the site where the lists are the query will return results based on the BCS data.
    These views can be based on criteria such as the weight of the product being returned and other fields.
    The data is presented as a list.
    You can make it read only or read-write based on SharePoint permissions on the list.  The account used to create the connection can edit.
    BCS is possible in on-premises SharePoint too
    here is a good read on it,
    http://www.dotnetcurry.com/showarticle.aspx?ID=632
    Stacy Simpkins | MCSE SharePoint | www.sharepointpapa.com

  • Can OBIEE 10G connect to a SQL Server database (2005)?

    We have Oracle BI running already. We have also a SQL Server database running. Now there is requirement that asks to connect to the SQL Server and directly send some SQL quires to the SQL Server and get result back and display it in answers. I know the normal process should be set ETL to load the data from the SQL Server to OBIEE and from there the report can be built. So I am not sure is this doable?

    Hi Srini,
    These is the steps I have done:
    1. open Oracle BI administration tool
    2. create a new repository
    3. select import from database, and specify the ODBC (connection to the SQL Server). It asked me to choose tables to import. I then selected one table. Now I can see the connection pool and the table being created in physical. I saved it.
    4. I then goes to BI interactive dashboard -> answers-> Direct Database Request. In the connection pool I entered the name of the connection pool in step 3. And entered some simple query and I got:
    error : Odbc driver returned an error (SQLExecDirectW).
    error : State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27022] Unresolved Connection Pool object: "asepostest_pool". (HY000)
    error : SQL Issued: {call NQSGetQueryColumnInfo('EXECUTE PHYSICAL CONNECTION POOL asepostest_pool select * from branch')}
    Should I modify NQSConfig.INI in C:\OracleBI\server\Config\ to make it point to my new repository? Like this?
    Star
    =
    asepostest1.rpd, DEFAULT;
    But then I couldn't restart BI server.

  • Connection with MS -SQL server Database

    Hi Experts,
    We are new with Oracle SES.
    We have created one table in MS SQL server 2005 in testing database called as Northwind, table is EMPdate with adding required column name as "URL","KEY","CONTENT","LASTMODIFIEDDATE","LANG".
    Now we create database source in Oracle SES by giving following things
    Database Connecting String: jdbc:sqlserver//<Loaclhost>:1433;databasename=Northwind
    UserId:
    Password:
    Query: Select URL,KEY,CONTENT,LASTMODIFIEDDATE,LANG,'text/html' CONTENTTYPE from EMPdate
    path separator: #
    Document Count : -1
    Parse Attributes :false
    And create Source & when we run schedule on this datadase source we got error that "invalid SQL command"
    Please can you provide sequence of steps to create MS SQL Server database source & generate the statistics.
    Thanks

    Hi,
    Thanks for the response.
    Running the Schedule for Stats collection -- I mean,the Schedule step whcih could be the immediate step just after database source creation
    The Crawl of the SQL Server not succeeded is Crawl Error
    which is located in C:\oracle\product\10.1.8\oradata\ses2\log direcory.
    We succeded with Web,ORACLE TABLE and FILE system sources as they were documented in the manual.
    Please Suggest all the steps to configure SQL server as Source
    Thanks in Advanace
    Cheers,
    Ramesh

  • Error Connecting to remote sql server database

    The sql server database is hosted on Godaddy hosting service.
    I am able to connect with many other remote computers so the issue resides on the remote computer.
    The remote computer is windows 7 32 bit 2009 service pack 1
    using the ODBC administrator we add a user DSN select SQL Server Version 6.01.7601.17514
    For the server we put in the server from godaddy somthing like   XYZDatabase.db.1110002.hostedresource.com
    Once enter the login id and password we get the following error.
    Any help would much appreciated.
    Remember, we have multiple other remote computers connecting with no issues.

    Hello,
    If connection works for several machines, but fails on others then may because the access is blocked by firewall. You have to unblock IP port 1433 for in- and outbound.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to connect to remote sql server database?

    Hallo,
    I am a new member, so please excuse me if my questions are dummy.
    I am using CR2008 SP2 to make reports from sql server 2005 databases.
    Localy there is no connection problem and everything works perfect.
    I would like to establish a connection with a remote sql server 2005,
    but i am not familiar with remote data retriving. which driver should i use? static ip? vpn? server ports?
    Any answer will be really appreciated

    Hello,
    This is more a question for Microsoft to see what and how they support remote connections to databases. As long as you have the connection made CR will not have any problems. You may find it is slow so optimizing your queries is highly recommended. Passing a million records through your web connector is going to take time.....
    I've personally used a VPN connection and then set the ODBC or OLE DB connection info to my test server here at work and it worked fine. But they were small data sets.
    Thank you
    Don

Maybe you are looking for