Results 1 to 6 of 6

Thread: Connect CR To SQL Without DSN !

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2002
    Posts
    59

    Question Connect CR To SQL Without DSN !

    I am using CR 8.5 n SQL server 2k. I want to create a DSNLess report. I have tried using the Data Explorer -> More Data Sources -> Microsoft Sql Server Option. The report by itself works fine but I don't know how to connect a dsnless report from my vbcode [CrViewer control] .

    Any Help will really be appriated.

    Thanx.
    - Marjo

  2. #2
    Hyperactive Member ARPRINCE's Avatar
    Join Date
    Mar 2003
    Location
    Pinoy in NJ
    Posts
    381
    I use OLE DB (ADO) as a data source when designing my reports (CR 9).

    Here's in part how I call my report on my form:

    VB Code:
    1. '+-----------------+
    2.         '| SQL SERVER INFO |
    3.         '+-----------------+
    4.         crConnectionInfo = New ConnectionInfo
    5.         With crConnectionInfo
    6.             .ServerName = "MYSQLSERVER"
    7.             .DatabaseName = "MYDATABASE"
    8.             .UserID = "MYUSERID"
    9.             .Password = "MYPASSWORD"
    10.         End With

    Hope this helps.

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2002
    Posts
    59
    crConnectionInfo = New ConnectionInfo
    With crConnectionInfo
    .ServerName = "MYSQLSERVER"
    .DatabaseName = "MYDATABASE"
    .UserID = "MYUSERID"
    .Password = "MYPASSWORD"
    End With
    Thanks ARPrince for replying. I am using 8.5 and I couldn't find the connectionInfo. Can you please provide me more details.

  4. #4
    Hyperactive Member ARPRINCE's Avatar
    Join Date
    Mar 2003
    Location
    Pinoy in NJ
    Posts
    381
    I don't use CR 8.5 so I may not be in the best position to assist you. I was thinking it would be more or less the same but It may not be supported by CR 8.5 afterall.

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2002
    Posts
    59
    Thanks ARPrince once again.

    Can anybody else help me please, I am desperately searching for a solution to this problem.

  6. #6
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965
    Here is my DSN-less connection String when I am using VB6, CR8.5 and SQL 7:

    VB Code:
    1. ConnectString = "Provider=SQLOLEDB;DATA SOURCE=192.168.XXX.XX;Initial Catalog=Database Name;USER ID=UserName;Password=Password"

    Good Luck
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width