connecting to sql server 2005 from powerbuilder 7.0?

Hi ,

Would anyone know how to connect from powerbuilder 7.0 to sql server
05?

Do I need additional oledb / odbc drivers? And Where can i get them?

Also , once i get the driver what classes etc do i need (I would be
greatful if someone could give me a link?)

Gideon

0
giddy
7/5/2007 1:21:59 PM
sybase.powerbuilder.general 62418 articles. 18 followers. Follow

10 Replies
539 Views

Similar Articles

[PageSpeed] 41

I've used the ODBC drivers that are installed with the SQL Server 2K5 
client. (Not sure what you mean by classes.)

Good luck,

Terry [TeamSybase] and Sequel the techno-kitten

giddy wrote:
> Would anyone know how to connect from powerbuilder 7.0 to sql server
> 05?
> 
> Do I need additional oledb / odbc drivers? And Where can i get them?
> 
> Also , once i get the driver what classes etc do i need (I would be
> greatful if someone could give me a link?)

-- 
*********************************
PowerBuilder for $95? No.
Personal use PB Enterprise *AND* PocketBuilder *AND* DW.NET *AND* Sybase 
IQ as
free benefits of an ISUG membership. See http://www.isug.com for details.
*** For a limited time, use promotion code MP20224C to get a $10 (USD) 
discount
on a complete new or renewal membership

*********************************
Click once a day to help the hungry
http://www.thehungersite.com
*********************************
Newsgroup User Manual
=====================
TeamSybase <> Sybase employee
Forums = Peer-to-peer
Forums <> Communication with Sybase
IsNull (AnswerTo (Posting)) can return TRUE
Forums.Moderated = TRUE, so behave or be deleted
*********************************

Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a free PowerBuilder Developer's Toolkit.
Version 3.0.02 now available at the Sandbox
PB Futures updated Apr 24/2006
See the PB Troubleshooting & Migration Guides at the Sandbox
^ ^
o o
=*=
0
Terry
7/5/2007 1:35:53 PM
> Would anyone know how to connect from powerbuilder 7.0 to sql server
> 05?

You should be able to connect using MSS.  I can with PB9 6533. 


0
Scott
7/5/2007 1:49:08 PM
hi,

Thanks.

I'm a powerbuilder newbie!

After i've installed sql servr 05 how do i connect to a database from
the application script? Thats what i meant by classes.

Gideon


0
giddy
7/5/2007 3:08:37 PM
You need to use a transaction object. You might want to start with the
tutorial in the online documentation as it will walk you through the
process of creating an application and connecting to a database. 

You may alsow want to look into upgrading as PowerBuilder 7 is rather
ancient and no longer supported. The current version is PowerBuilder
11. (www.sybase.com/powerbuilder)

Regards,
Dave Fish
Sybase

On Thu, 05 Jul 2007 08:08:37 -0700, giddy <gidisrael@gmail.com> wrote:

>hi,
>
>Thanks.
>
>I'm a powerbuilder newbie!
>
>After i've installed sql servr 05 how do i connect to a database from
>the application script? Thats what i meant by classes.
>
>Gideon
>
0
Dave
7/5/2007 3:37:08 PM
Specifically, you can get a 30-day eval of PB11 from the Sybase web 
site, or for $85 (see the discount code below) you can get PB11, 
PocketBuilder, DW.NET, IQ, ASE... for personal use. Oh yeah, you get an 
ISUG membership too, including a year's worth of the ISUG Technical 
Journal.

Good luck,

Terry [TeamSybase] and Sequel the techno-kitten

Dave Fish [TeamSybase] wrote:
> You need to use a transaction object. You might want to start with the
> tutorial in the online documentation as it will walk you through the
> process of creating an application and connecting to a database. 
> 
> You may alsow want to look into upgrading as PowerBuilder 7 is rather
> ancient and no longer supported. The current version is PowerBuilder
> 11. (www.sybase.com/powerbuilder)
> 
> Regards,
> Dave Fish
> Sybase
> 
> On Thu, 05 Jul 2007 08:08:37 -0700, giddy <gidisrael@gmail.com> wrote:
> 
>> hi,
>>
>> Thanks.
>>
>> I'm a powerbuilder newbie!
>>
>> After i've installed sql servr 05 how do i connect to a database from
>> the application script? Thats what i meant by classes.
>>
>> Gideon
>>


-- 
*********************************
PowerBuilder for $95? No.
Personal use PB Enterprise *AND* PocketBuilder *AND* DW.NET *AND* Sybase 
IQ as
free benefits of an ISUG membership. See http://www.isug.com for details.
*** For a limited time, use promotion code MP20224C to get a $10 (USD) 
discount
on a complete new or renewal membership

*********************************
Click once a day to help the hungry
http://www.thehungersite.com
*********************************
Newsgroup User Manual
=====================
TeamSybase <> Sybase employee
Forums = Peer-to-peer
Forums <> Communication with Sybase
IsNull (AnswerTo (Posting)) can return TRUE
Forums.Moderated = TRUE, so behave or be deleted
*********************************

Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a free PowerBuilder Developer's Toolkit.
Version 3.0.02 now available at the Sandbox
PB Futures updated Apr 24/2006
See the PB Troubleshooting & Migration Guides at the Sandbox
^ ^
o o
=*=
0
Terry
7/5/2007 5:11:00 PM
hi,

Heres the thing.I've already mentioned i'm a .NET programmer , C# is
my forte and is what i use to make my software.

I have this app built in pb 7.0 that runs using sql2000.

The script connects like this:

sqlca.dbms = "MSS Microsoft SQL Server 6.x"
sqlca.database = "winacc"
sqlca.servername = "cispc"
sqlca.logid = "sa"
sqlca.autocommit = false
sqlca.DBParm = ""


Now , i just want to change the script so it calls an sql 05 DB? What
do i have to do?

I know (from my C# experience) that the connection string i need to
use is:
"Data Source=localhost\SQLEXPRESS;Initial Catalog=HTLDATA;Integrated
Security=SSPI;";

Where will i put this? I just need a little snippet on how , what
class connects to sql servr 2005 , executes a query ,and how it reads
the resultant data? (Perhaps a link to an!?)

Gideon

0
giddy
7/5/2007 6:27:33 PM
Did you try to connect using the connection information below?
Typically only the first three letters of the DBMS parameter are
needed when connecting. 

You should know that the MSS driver is based on DBLIB and I don't know
if MS supports that with SQL Server 2005? If it doesn't then you'll
have to use ODBC or OLE DB (I think that was available in PowerBuilder
7) to connect to the database. 

PowerBuilder 11 has support for the SNC interface to SQL Server 2005. 

Regards,
Dave Fish
Sybase

On Thu, 05 Jul 2007 11:27:33 -0700, giddy <gidisrael@gmail.com> wrote:

>hi,
>
>Heres the thing.I've already mentioned i'm a .NET programmer , C# is
>my forte and is what i use to make my software.
>
>I have this app built in pb 7.0 that runs using sql2000.
>
>The script connects like this:
>
>sqlca.dbms = "MSS Microsoft SQL Server 6.x"
>sqlca.database = "winacc"
>sqlca.servername = "cispc"
>sqlca.logid = "sa"
>sqlca.autocommit = false
>sqlca.DBParm = ""
>
>
>Now , i just want to change the script so it calls an sql 05 DB? What
>do i have to do?
>
>I know (from my C# experience) that the connection string i need to
>use is:
>"Data Source=localhost\SQLEXPRESS;Initial Catalog=HTLDATA;Integrated
>Security=SSPI;";
>
>Where will i put this? I just need a little snippet on how , what
>class connects to sql servr 2005 , executes a query ,and how it reads
>the resultant data? (Perhaps a link to an!?)
>
>Gideon
0
Dave
7/5/2007 10:15:49 PM
> Heres the thing.I've already mentioned i'm a .NET programmer , C# is
> my forte and is what i use to make my software.
>
> I have this app built in pb 7.0 that runs using sql2000.
>
> The script connects like this:
>
> sqlca.dbms = "MSS Microsoft SQL Server 6.x"
> sqlca.database = "winacc"

This is the name of the database you want to connect to.  Based on your 
example, use HTLDATA.

> sqlca.servername = "cispc"

This is the name of the server. I believe the dblib interface cannot 
directly connect to a named instance (which is what you are using in your 
example).  The easiest solution is to install the default instance (and use 
the appropriate name here).  I don't know if there is a way to create an 
alias to a named instance using the utilities available with sql server 
2005 - there was with sql server 2000.  There may also be some additional 
quirks with sql express that don't work well with the ancient interface - I 
don't use it so I can't directly comment.

> sqlca.logid = "sa"
> sqlca.autocommit = false
> sqlca.DBParm = ""
>
>
> Now , i just want to change the script so it calls an sql 05 DB? What
> do i have to do?
>
> I know (from my C# experience) that the connection string i need to
> use is:
> "Data Source=localhost\SQLEXPRESS;Initial Catalog=HTLDATA;Integrated
> Security=SSPI;";
>
> Where will i put this? I just need a little snippet on how , what
> class connects to sql servr 2005 , executes a query ,and how it reads
> the resultant data? (Perhaps a link to an!?)

PB isn't c# - you will need to adjust your expectations.  The transaction 
object (sqlca) is roughly equivalent to the connection class but is used 
much differently.   As everyone has alreadly mentioned, you are using an 
ANCIENT version of PB - expect difficulties. 


0
Scott
7/6/2007 12:24:08 PM
hi ,
Thank you for the replies.

Before i send the code changes over ,

What about these lines:
> sqlca.dbms = "MSS Microsoft SQL Server 6.x"
> sqlca.database = "winacc"

This is what was used to connect to sql server 2000 , but its says
"Microsoft SQL Server *6.x" should'nt it have been 7? Or is this the
name of some driver? What do i have to change to use sql 05?

Or is there a documentation to this class?

Dave,
If i do need to use oledb or odbc , what classes do i need to use.
Again , is there some documentation on it.

The reason i'm posting this is , when i search google for anything to
do with pb7 , i get almost no results!


Thanks so much
Gideon

0
giddy
7/8/2007 8:03:42 AM
Gideon,

PowerBuilder only uses the first three letters of the dbms parameter
to determine which database driver to load so it doesn't really matter
if it is a SQL Server 6.x or 7 database. 

The reason you aren't finding any information when you search for
PowerBuilder 7 information is because that version was released about
8 or 9 years ago. Its kind of like looking for information on Windows
3.1. <g>

However I think the PowerBuilder 9, Connecting to your database
manual, which is still available on line should help you because the
connection process in 9 wasn't that different than 7. 

http://manuals.sybase.com/onlinebooks/group-pb/pbg0900e/connpb

Regards,
Dave Fish
Sybase

On Sun, 08 Jul 2007 01:03:42 -0700, giddy <gidisrael@gmail.com> wrote:

>hi ,
>Thank you for the replies.
>
>Before i send the code changes over ,
>
>What about these lines:
>> sqlca.dbms = "MSS Microsoft SQL Server 6.x"
>> sqlca.database = "winacc"
>
>This is what was used to connect to sql server 2000 , but its says
>"Microsoft SQL Server *6.x" should'nt it have been 7? Or is this the
>name of some driver? What do i have to change to use sql 05?
>
>Or is there a documentation to this class?
>
>Dave,
>If i do need to use oledb or odbc , what classes do i need to use.
>Again , is there some documentation on it.
>
>The reason i'm posting this is , when i search google for anything to
>do with pb7 , i get almost no results!
>
>
>Thanks so much
>Gideon
0
Dave
7/8/2007 1:22:12 PM
Reply:

Similar Artilces:

Connecting to SQL Server 2005 from PowerBuilder 7.0
I am using Power Builder 7.0 and connecting to SQL Server 2000 usng native drivers. Now I am upgrading SQL Server 2000 to SQL Server 2005. I am getting the following error when I try connecting to SQL 2005: SQLCode = -1 SQLDBCODE=10003 SQLErrText = Login Incorrect Please let me know whether it is possible to connect to SQL Server 2005 using PB 7.0 Thanks in advance You should be able to use OLE_DB connection with the later versions of PB 7.0.x. I had a customer that used PB 7.0.3 after the SQL Server upgrade without any problems reports, since the customer has upgrade...

how do you do a select into using powerbuilder 8.0 connecting to sql server 7.0
I have a powerbuilder app that used to connect to a sql anywhere database that is now connecting to sql server. I have found an equivalent to the today(*) function: select substring(convert(char(10), getdate(), 120), 1, 10) The problem with this is that it will not work in a select-into because sub quereies are not allowed. So, what I want to do is a select-into using the above conversion query, store it in a local date variable above but I keep getting a syntax error(I have also tried using a local string variable and I get the same error) . Here is the code that generates the...

Connect MS-SQL 7.0 in PowerBuilder 7.0
In PowerBuilder 6.5, I can connect MS-SQL 6.5 directly not using ODBC, but in PowerBuilder 7.0, how can I connect MS-SQL 7.0 directly ? Please post to the powersoft.public.powerbuilder newsgroups This is dedicated to PB issues when used within Jaguar Masun wrote: > In PowerBuilder 6.5, I can connect MS-SQL 6.5 directly not using ODBC, but > in PowerBuilder 7.0, how can I connect MS-SQL 7.0 directly ? ...

PowerBuilder 7.0 & SQL Server 7.0
Hi: I've develop an application that connect to and MS SQL SERVER 7.0 database via ODBC. When i make the .exe file and run it in Win95 or Windows NT Workstation it works fine, but when i run it in a Win98 client the following error apears. SQLSTATE=22005 - "Invalid character value for cast specification." Any clues about this. The exe was build in PowerBuilder 7.0 over a Windows NT Workstation 4.0 Thanks in advance. Jorge, Try adding to the dbparm - CallEscape='No'. Here is an example: SQLCA.DBParm = "Connectstring='DSN=<your ...

PowerBuilder 7.0 & SQL Server 7.0
Hi: I've develop an application that connect to and MS SQL SERVER 7.0 database via ODBC. When i make the .exe file and run it in Win95 or Windows NT Workstation it works fine, but when i run it in a Win98 client the following error apears. SQLSTATE=22005 - "Invalid character value for cast specification." Any clues about this. The exe was build in PowerBuilder 7.0 over a Windows NT Workstation 4.0 Thanks in advance. Jorge, Try adding to the dbparm - CallEscape='No'. Here is an example: SQLCA.DBParm = "Connectstring='DSN=<your ...

Chinese became chaos code on PowerBuilder 9.0.3 connect to SQL server 7.0
I used PowerBuilder 9.0.3 connect to SQL server 7.0, I keyed in Chinese data when Chinese became chaos code on display. I preview or print out also got the chaos code. I used OLE DB to link with SQL server 7.0 Please give me comment to fix it. -- Best Regards Wong Tat Ming Tel: 25235090 Email: tmwong@diagnostix.com.hk You need the Unicode versions of these.... PB 10.0 or higher plus SS2005 will get you to full Unicode compatibility. "chu" <chuchoy@msn.com> wrote in message news:4588d7be$1@forums-1-dub... > I used PowerBuilder 9.0.3 connect to ...

Connectivity of PowerBuilder 6.5 and SQL Server 7.0
Hi Guys, I need help regarding connectivity with PB 6.5 and SQL Ser. 7.0. I am getting an error message "DBMS MS Sql Server ... not supported in current installation' or 'Unable to load the requested database interface". I have required files for both the system and for PB i.e., NTWDBLIB.DLL PBMSS60.DLL but still i am not able to connect to the database. Please help. Regards, MS Check the sybase site, there is useful infor about the matter. Good Luck, Alessandro Barbieri "mahesh" <mahesh.shah@codecindia.com> wrote in message new...

POWERBUILDER 7.0
I am having problems getting updates to commit through powerbuilder. We have a few layers of stored procedures which make the queries a little long. Have tried MSS, ODBC, OLE DB connections, we've been messing with connection options for weeks, nothing seems to work. ODBC traces show success. This may not help you much; but, we have been using PB 7.0 with MS SQL Server 7.0 for months in a production application and have never had a problem with commits on updates (using native MSS drivers). So, I would look at your own code. Where do you issue the commits? regards ...

problem when connecting MS SQL Server 7.0 with powerbuilder 6.5
Dear All, I have some problem when connecting MS SQL Server 7.0 with powerbuilder 6.5 The error message is: Database transaction information not availiable. Call SetTrans or SetTransObject function. I have a window with 1 button and 1 datawindow The datawindow inside contain a SQL statement in the click event of the botton, the script is: parent.dw_1.SettransObject(SQLCA) parent.dw_1.retrieve() Can anyone tell me what is the problem? And how to solve it??? Thank You Very Much!!! It seems that the database connection is not available or not successfully connected. ...

SQl server 7.0 and Powerbuilder 9.0
Hello there. I have this situation we,re working with Powerbuilder 9.0 and SQL Server 7.0 with an original application developed in Powerbuilder 6.5, this mean that we made the update to 9.0, well after that in some SQL that involve string field like char or varchar the values were evaluated with double quoted like this example type in "1","2". Select * from clients Where tipo in " 1","2" Well this syntax generated error because dont recognize del double quote, now the syntax must use single quoted '1', '2' li...

PowerBuilder 5.0.04 and Microsoft SQL Server 7.0
I am having problems with a powerbuilder 5.0.04 application that uses pipeline objects. The only thing that has changed is the destination database has recently been upgraded from Microsoft SQL Server 6.5 to 7.0. We connect via ODBC. After upgrading to 7.0, we get the -4 error code (i.e. Table Not Found). Does anyone know if any new drivers are needed to support Microsoft SQL Server 7.0? Thanks, Victoria I am not sure but there is a 3.70 ODBC Driver from Microsoft. I am not sure the older driver works ok with MS 7.0. pv Victoria Kelsey wrote: > > I am having...

PowerBuilder 5.0.3 strange problem with SQL Server 7.0
Hi, I am doing a simple select statment in a PB script, it works fine if I am connected to a SQL Anywhere DB with odbc, but the same code will not work if I am connected to MS SQL Server! The code is something like: int li_total Select count(*) from sfref into :li_total; I will not get an SQL error BUT li_total will not be updated!! Howerver the same code will work fine with SQL Anywere! Any help would be great!! Don't know why it works at all, it's not standard syntax. Maybe something that works in SQL Anywhere. Anyway, it should be: Select count(*...

PowerBuilder 5.0.3 strange problem with SQL Server 7.0
Hi, I am doing a simple select statment in a PB script, it works fine if I am connected to a SQL Anywhere DB with odbc, but the same code will not work if I am connected to MS SQL Server! The code is something like: int li_total Select count(*) from sfref into :li_total; I will not get an SQL error BUT li_total will not be updated!! Howerver the same code will work fine with SQL Anywere! Any help would be great!! Don't know why it works at all, it's not standard syntax. Maybe something that works in SQL Anywhere. Anyway, it should be: Select count(*...

Powerbuilder 5.0/7.0 and MS SQL 7.0 Performance issues
We recently converted our app from Powerbuilder 5.0 to PB 7.0 -- the app in PB 7.0 definitely runs slower on the client PC's than it did in PB 5.0. Now we are migrating the database from MS SQL 6.5 to 7.0 SP2. We successfully converted the databases in a testing environment, but now the app runs terribly slow! I don't think it's a hardware issue -- the test box is a Compaq 8500 quad Xeon 500 w/1GB Ram. We experimented running the app as a PB 5.0 app against MS SQL 7.0 and the problem is the same. When we execute SQL directly against the DB outside of PB, we see no perf...

Web resources about - connecting to sql server 2005 from powerbuilder 7.0? - sybase.powerbuilder.general

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
... Win32 or newer style .Net development After several years of work, Sybase is ready to deliver on the final step in its plan to move PowerBuilder ...

Jim O'Neil (@jimoneil) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

The HP Booth Staff (Goons) Owe Me an Apology
... when you might need to use it. For instance, when I was in the WinRunner world there were plugins for driving terminal emulators and powerbuilder ...

Contact Us - Sybase Inc
Thanks for visiting the 主页 section of Sybase.com. Here you will find information about Contact Us. For more information about Business Intelligence, ...

热门搜索 - 我的异常网
... 我的异常网 » 热门搜索 sdpnet2 移动【A111】其它用户原因鉴权失败,是什么意思啊 http:// 192.168.1.102:22578 本网站服务器位于美国,受美国法律保护 MiniUI js 破解 http://192.168.1.103:8080/ powerbuilder ...

Mobile app security: Always keep the back door locked
The best way to keep mobile apps safe is to secure the services they connect to.

10 Tech Skills That Will Instantly Net You A $100,000+ Salary
... that let's developers run Java applications. Java is highly popular language for writing web apps and custom enterprise apps. No. 8: PowerBuilder ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Resources last updated: 12/28/2015 2:29:57 PM