realbasic-nug
[Top] [All Lists]

Re: ODBC connecting to MS SQL

To: real basic <realbasic-nug@lists.realsoftware.com>
Subject: Re: ODBC connecting to MS SQL
From: Michael Rebar <mrebar@uoregon.edu>
Date: Thu, 30 Jul 2009 16:12:12 -0700
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <mailman.1.1248980408.20518.realbasic-nug@lists.realsoftware.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
Thread-index: AcoRaytaaaaPuH1eEd6xGQAbY5NmSg==
Thread-topic: ODBC connecting to MS SQL
User-agent: Microsoft-Entourage/11.4.0.080122
> I' wondering if anyone can help me out. I'm trying to read data from a
> database served by MS SQL. Development will be done on a Mac, and deployment
> on Windows.
> 
> So far, I downloaded Actual Tecnologies plugin. The next step was to write
> code exactly as provided by the LR on ODBC class:
> 
> Dim db as ODBCDatabase
> db= New ODBCDatabase
> db.DataSource=""
> If db.Connect then
>  //proceed with database operations
> else
>   Break
>   MsgBox "The connection failed."
> end if
> 
> When I do this, I get a error "[iODBC][Driver Manager]Invalid attribute/option
> identifier" in db.ErrorMessage

Have you configured a DSN?

Try another example from the LR:

  db.DataSource = "my_DSN" //the DSN is defined using the ODBC administrator
  db.UserName = "my_userID"
  db.Password = "my_password"
  //keyword example (UserName and Password properties are ignored)
  db.DataSource = "DSN=my_DSN;UID=my_userID;PWD=my_password"

When you deploy on Windows, I'd recommend the Microsoft drivers. I run RB
apps against MS SQL servers via ODBC every day. Works well.

I don't remember for certain, but I think I ran your version of RB with the
then current Actual drivers against MS-SQL 2005 servers.

Michael



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>