December 16, 2005 at 9:15 am
Hi,
in my ASP code I am trying to connect to sybase on UNIX server.
So far only DSN works.
But my goal is to use OLEDB connection string.
On the web server I have installed "Sybase ASE OLE DB Provider".
Here is my connection string:
"Provider=Sybase ASE OLE DB Provider;Data Source=THEFORCE;Initial Catalog=picard;User Id=xxx'Password=xxxxx;"
It returns an error:
ASE OLE DB Provider (0x80004005)
Invalid server name was specified.
Any help would be appreciated.
Thanks,
Rob
December 16, 2005 at 9:47 am
Can we assume that the web server can use THEFORCE?
Have your tried replacing Data Source=THEFORCE with Server=THEFORCE?
December 19, 2005 at 2:04 pm
add the "commlinks=tcpip" parameter to your connect string if your ASA instance is on a different subnet... for instance, you are on 143.99.115.39 and your ASA is on 143.99.113.93... (it's the number in this position xxx.xx.113.xxx that identifies the subnet). This parameter is needed by Sybase Central also. You will notice that "dblocate" only finds instances on the same subnet where executed. Hope this helps.
December 19, 2005 at 2:08 pm
Set cn = Server.CreateObject("ADODB.Connection")
cn.Provider = "Sybase.ASEOLEDBProvider.2"
cn.Properties("Initial Catalog").Value = "picard"
cn.Properties("Server Name") = "riscdev1"
cn.Properties("Server Port Address") = "2050"
cn.Properties("User ID") = "xxxxxxx"
cn.Properties("Password") = "xxxxxx"
----------------------------------------
this works.
Another challenge for me is to learn to use ISQL.
I can't find a way to run a batch (create table...). Anybody did this?
Thanks,
Rob
December 20, 2005 at 12:19 pm
Assuming that ISQL on Sybase is the equivalent of OSQL in SQL Server then the easiest way of using a batch file to create tables is to create a text file containing your T-SQL Script then use the command line switches of ISQL to pick up your T-SQL Script file
For example for SQL Server I could do
OSQL -E -SMyDBServer -ic:\scripts\BuildDatabase.SQL
-E means trusted security
-S allows me to specify the server
-i is the input file.
December 20, 2005 at 1:25 pm
I tried OSQL. it didn't work.
This works:
C:\Sybase\bin\>isql -Uxxx -Pxxx -Sxxxx
1>:r Script1.sql
2>go
3>:r Script2.sql
4>go
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply