Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unable to connect to SQL Server

390 views
Skip to first unread message

Rich Herbert

unread,
Mar 1, 2000, 3:00:00 AM3/1/00
to
I'm attempting have PDOX7 (95/NT) w/ BDE 5.01 hit on MS SQL 7.0 Server
but have been unsuccessful. Here are the details:

NT Server Name: SRINT1
Database Name: SRIsql
From Control Panel I open ODBC Data Sources (32 Bit), Click on the
System DSN tab. Listed under System Data Sources is SRIsql with
SQLServer as the driver. Click on the button labeled Configure...,
click Finish, and then I click the button labeled "Test Data Source" and
the test works, "TEST COMPLETED SUCCESSFULLY". Now, I go into BDE
Administrator (from the control panel) and click on the Configuration
tab. I right click on ODBC and select new to create a new driver. I
use "SQL Driver" as the driver name, I select "SQL Server" from the drop
down for the ODBC Driver Name, and "SRIsql" from the list under 'Select
Data Sources to Create Aliases', and click OK. I now have "SQL Driver"
listed under Configuration|Drivers|ODBC. Then (within BDE Admin) I
click on the tab labeled Databases, right click on "Databases" at the
top of the list and select New. I select "SQL Driver" from the drop
down list a the Database Driver Name. There is now "ODBC1" listed. To
the far left is a "+" followed by a green arrow pointing to the right
and another icon that kinda looks like a chain link on top and a drive
below it. If I double-click on "ODBC1" I get an "Operation Not
Supported" message. If I right click on ODBC1 and select Apply the
green arrow goes away. Figuring I must be done, I double-click on the
ODBC1, enter my user name and password (authenticated to NT) and I get
the following error: "Invalid configuration parameter. Alias: OBDC1.
BDE Error 12550 [$31] [$6].

Now I'm stuck and don't know what to do! From reading all of the other
message about connecting to SQL I know it can be done but I'm missing
something somewhere!

Any help would be very much appreciated. Sorry for all of the detail
but I figured it would be good to trace all of my steps...

Thanks,
Rich

Kasey Chang

unread,
Mar 1, 2000, 3:00:00 AM3/1/00
to
If you're using ODBC driver, you need to declare an ODBC DSN first.
Then create an ALIAS BASED ON THE DSN as the type... THAT alias
is the one you can actually use.

Rich Herbert

unread,
Mar 1, 2000, 3:00:00 AM3/1/00
to
Thanks Kasey! I'm not sure exactly what I'm doing (or have done) but I seem
to be able to connect to the database. I can go in to the Alias Manager
within PDOX, select ODBC1 as the alias, enter my password, click Connect, and
get connected to the database. It seems like ODBC1 is not really an alias
though? If I go to the Project Viewer and attempt to change the working
directory to :ODBC1: I get an error, "Alias is a server." I can however do
things like

if addalias("SRIProductData","SQL Driver",dynAlias) then
if dbSQL.open("ODBC1") then
if tv.open("SRINT1.SRIsql.aaaagent") then
else
errorshow("unable to open table")
endif
else
errorshow("unable to open database")
endif
else
errorshow()
endif

It's interesting though that the table that is displayed appears to have
records but all of them are empty!

Ah, the joys of database programming!

Rich

Anders Jonsson

unread,
Mar 1, 2000, 3:00:00 AM3/1/00
to
Rich,

PMFJI

It is no possible to have your working directory on the SQL server and I
can't see any need for it.

I do not understand your code, but if it works for you...

You say that the tables are empty. Do you know if they are keyd? The
ODBC-driver for SQL7 will not work on unkeyd tables.

HTH

Anders


Rich Herbert <ri...@skyridgedesign.com> skrev i
diskussionsgruppsmeddelandet:38BD7877...@skyridgedesign.com...

Kasey Chang

unread,
Mar 1, 2000, 3:00:00 AM3/1/00
to
Right. I think BDE calls it a VIRTUAL alias.

Rich Herbert

unread,
Mar 2, 2000, 3:00:00 AM3/2/00
to
Oh! I'm obviously new to SQL server and I didn't realize the ODBC driver for
SQL 7 would not work with unkeyed tables! Thanks!
Rich


Anders Jonsson wrote:

> Rich,
>
> PMFJI
>
> It is no possible to have your working directory on the SQL server and I
> can't see any need for it.
>
> I do not understand your code, but if it works for you...
>
> You say that the tables are empty. Do you know if they are keyd? The
> ODBC-driver for SQL7 will not work on unkeyd tables.
>
> HTH
>
> Anders
>
> Rich Herbert <ri...@skyridgedesign.com> skrev i
> diskussionsgruppsmeddelandet:38BD7877...@skyridgedesign.com...

Anders Jonsson

unread,
Mar 2, 2000, 3:00:00 AM3/2/00
to
Rich,

Glad to help. I am rather new to SQL server myself, and sometimes I find it
quite difficult to work against a SQL server back-end. There is really a lot
of things that need do be done differently compared to an app where you only
use Paradox tables.

Good luck!

Anders

Rich Herbert <ri...@skyridgedesign.com> skrev i

diskussionsgruppsmeddelandet:38BEAF2F...@skyridgedesign.com...

0 new messages