MYSQL and PowerBuilder data exchange

Hi,

I was hoping some one would help me with something. I am new to MYSQL and 
PowerBuilder, I have been able to pass variables between PowerBuilder and MS 
SQL Server but am unable to do so using MYSQL. is there somewhere I can 
download an example program showing how this is done?

This would be deeply appreciated,

Thanks,
Regards,
Gareth Murray 


0
Gareth
9/21/2009 9:04:20 AM
sybase.powerbuilder.database 9855 articles. 2 followers. Follow

3 Replies
488 Views

Similar Articles

[PageSpeed] 45

What version of PowerBuilder?

What do you mean by 'pass variables'? Is that passing variables to a stored 
procedure or inline sql statement? Perhaps if you gave an example of how you 
do it with SQL Server, someone could then suggest something.

"Gareth Murray" <garethmur@gmail.com> wrote in message 
news:4ab74194@forums-1-dub...
> Hi,
>
> I was hoping some one would help me with something. I am new to MYSQL and 
> PowerBuilder, I have been able to pass variables between PowerBuilder and 
> MS SQL Server but am unable to do so using MYSQL. is there somewhere I can 
> download an example program showing how this is done?
>
> This would be deeply appreciated,
>
> Thanks,
> Regards,
> Gareth Murray
> 


0
Roland
9/21/2009 12:10:16 PM
This is a very old example of validation a user for an application. im 
using powerbuilder version 10. and the latest mysql

-->Stored Proc MSSQL<--
CREATE PROCEDURE p_verify
   @user_name   varchar(50),
   @password  varchar(50)
as
begin
   declare @return_cd int
        if exists(select user_type
                    from AY_USERS (nolock)
                   where user_name  = @user_name
                     and user_password = @password)
     begin
       set @return_cd = (select user_type
                           from AY_USERS (nolock)
                          where user_name  = @user_name
                            and user_password = @password)
       end
   else
     begin
       set @return_cd = 0
       end
    select @return_cd
end

-->Power Builder Script <--

String user_name, password
Long ll_return = 0

user_name = sle_user_name.text
password = sle_password.text

declare verification procedure for p_verify
@user_name = :user_name,
@password = :password
using SQLCA;

       SQLCA.AutoCommit = TRUE
	   EXECUTE verification;
	   SQLCA.AutoCommit = FALSE
		
		if SQLCA.SQLERRTEXT <> "" then
			messagebox('', SQLCA.SQLErrText)
		end if
		
		if SQLCA.SQLCode = 0 then
			fetch verification into :ll_return;
			//messagebox('', SQLCA.SQLErrText)
			//messagebox('', ll_return)
			// test ll_return
		end if

		if ll_return = 0 then
			messagebox ("Verification","Failed")
			w_user_setup.cb_update.text = "Verify For Update"
			close(w_verify)
		end if
		if ll_return = 1 then
			messagebox ("Verification","Accepted")
			w_user_setup.cb_update.text = "Update"
			close(w_verify)
		end if
		if ll_return = 2 then
			messagebox ("Verification","Access Level Not High Enough")
			w_user_setup.cb_update.text = "Verify For Update"			
			close(w_verify)	
       end if
       CLOSE verification;

and thats what I know used to work for me, i actually havent coded in 
years, so im really rusty.

Any Help to make this work with a MYSQL databse woule be appreciated...
Thanks,
Regards,
Gareth Murray


Roland Smith [TeamSybase] wrote:
> What version of PowerBuilder?
> 
> What do you mean by 'pass variables'? Is that passing variables to a stored 
> procedure or inline sql statement? Perhaps if you gave an example of how you 
> do it with SQL Server, someone could then suggest something.
> 
> "Gareth Murray" <garethmur@gmail.com> wrote in message 
> news:4ab74194@forums-1-dub...
>> Hi,
>>
>> I was hoping some one would help me with something. I am new to MYSQL and 
>> PowerBuilder, I have been able to pass variables between PowerBuilder and 
>> MS SQL Server but am unable to do so using MYSQL. is there somewhere I can 
>> download an example program showing how this is done?
>>
>> This would be deeply appreciated,
>>
>> Thanks,
>> Regards,
>> Gareth Murray
>>
> 
> 
0
Gareth
9/21/2009 6:45:53 PM
I have not used MySQL myself so I can't help. Sorry, hopefully someone else 
will chime in.

"Gareth" <garethmur@gmail.com> wrote in message 
news:4ab7c9e1@forums-1-dub...
> This is a very old example of validation a user for an application. im 
> using powerbuilder version 10. and the latest mysql
>
> -->Stored Proc MSSQL<--
> CREATE PROCEDURE p_verify
>   @user_name   varchar(50),
>   @password  varchar(50)
> as
> begin
>   declare @return_cd int
>        if exists(select user_type
>                    from AY_USERS (nolock)
>                   where user_name  = @user_name
>                     and user_password = @password)
>     begin
>       set @return_cd = (select user_type
>                           from AY_USERS (nolock)
>                          where user_name  = @user_name
>                            and user_password = @password)
>       end
>   else
>     begin
>       set @return_cd = 0
>       end
>    select @return_cd
> end
>
> -->Power Builder Script <--
>
> String user_name, password
> Long ll_return = 0
>
> user_name = sle_user_name.text
> password = sle_password.text
>
> declare verification procedure for p_verify
> @user_name = :user_name,
> @password = :password
> using SQLCA;
>
>       SQLCA.AutoCommit = TRUE
>    EXECUTE verification;
>    SQLCA.AutoCommit = FALSE
>
> if SQLCA.SQLERRTEXT <> "" then
> messagebox('', SQLCA.SQLErrText)
> end if
>
> if SQLCA.SQLCode = 0 then
> fetch verification into :ll_return;
> //messagebox('', SQLCA.SQLErrText)
> //messagebox('', ll_return)
> // test ll_return
> end if
>
> if ll_return = 0 then
> messagebox ("Verification","Failed")
> w_user_setup.cb_update.text = "Verify For Update"
> close(w_verify)
> end if
> if ll_return = 1 then
> messagebox ("Verification","Accepted")
> w_user_setup.cb_update.text = "Update"
> close(w_verify)
> end if
> if ll_return = 2 then
> messagebox ("Verification","Access Level Not High Enough")
> w_user_setup.cb_update.text = "Verify For Update" close(w_verify) end if
>       CLOSE verification;
>
> and thats what I know used to work for me, i actually havent coded in 
> years, so im really rusty.
>
> Any Help to make this work with a MYSQL databse woule be appreciated...
> Thanks,
> Regards,
> Gareth Murray
>
>
> Roland Smith [TeamSybase] wrote:
>> What version of PowerBuilder?
>>
>> What do you mean by 'pass variables'? Is that passing variables to a 
>> stored procedure or inline sql statement? Perhaps if you gave an example 
>> of how you do it with SQL Server, someone could then suggest something.
>>
>> "Gareth Murray" <garethmur@gmail.com> wrote in message 
>> news:4ab74194@forums-1-dub...
>>> Hi,
>>>
>>> I was hoping some one would help me with something. I am new to MYSQL 
>>> and PowerBuilder, I have been able to pass variables between 
>>> PowerBuilder and MS SQL Server but am unable to do so using MYSQL. is 
>>> there somewhere I can download an example program showing how this is 
>>> done?
>>>
>>> This would be deeply appreciated,
>>>
>>> Thanks,
>>> Regards,
>>> Gareth Murray
>>>
>> 

0
Roland
9/21/2009 7:22:38 PM
Reply:

Similar Artilces:

Version of PowerBuilder (ref: Creating database for PowerBuilder)
I'm using PowerBuilder v8.0 and would like to create a notification system for my practiculum project. I'd like to use Access to create the database. Please enlighten me on what should I create (e.g. tables, queries) for the usage of it. Thank You. Regards, Yang Ashra Don't double post, it's bad etiquette. Unless you have a very good reason to do so, we recommend you don't use Access. Use SQL Anywhere instead - it's more stable - and a far better database in my opinion. PowerBuilder (enterprise) supports just about every database out there, so if you...

How to get data from database in powerbuilder?
Hi ALL, Can I ask how to get data from database in powerbuilder? My Code is: declare cursor_report cursor for select * from Member_Table using SQLCA; open cursor_report; li_count = 0 do li_count++ fetch cursor_report into : ls_case_no, :ls_name; loop while SQLCA.SQLCode = 0 messagebox('ls_case',ls_case) But it seems nothing retrieved, how to solve it? Thank You!!! The code you showed below has no error checking, so I'd imagine that you're hitting an error somewhere that isn't being reported on. BTW, have you looked at the data...

How to get data from database in powerbuilder
Hi ALL, Can I ask how to get data from database in powerbuilder? My Code is: declare cursor_report cursor for select * from Member_Table using SQLCA; open cursor_report; li_count = 0 do li_count++ fetch cursor_report into : ls_case_no, :ls_name; loop while SQLCA.SQLCode = 0 messagebox('ls_case',ls_case) But it seems nothing retrieved, how to solve it? Thank You!!! please don't cross-post. Your question is answered in the .general forum -- Paul Horan[TeamSybase] VCI Springfield, MA www.vcisolutions.com ...

PowerBuilder driver to MySql DataBase
Does PowerBuilder has driver to MySql Database ? I didn't find that option in the installation. Thanks Yossi Dallal > Does PowerBuilder has driver to MySql Database ? > I didn't find that option in the installation. > You can connect to MySQL via ODBC: http://www.mysql.com/products/connector/odbc/ Thanks <Ed> wrote in message news:49aad4de.6739.1681692777@sybase.com... >> Does PowerBuilder has driver to MySql Database ? >> I didn't find that option in the installation. >> > > You can connect to MySQL via ODBC: >...

data exchange between PowerBuilder applications
PowerBuilder 11.5.1 I am looking for a possibility to exchange data between two or more PowerBuilder applications which are all under my control. I tried to use the Send()/Post() functions. I pass the values in the wordParm and longParm respectively. This works fine for numeric data only. But I was not able to pass string data this way. Obviously the String(longParm, "address") Syntax does not work over more than one PowerBuilder application - which actually is no surprise. Is there another way in PowerBuilder to do this (apart from using DDE)? Andi Hi Andi, ...

Select in Powerbuilder Database painter WORKS but does NOT in Powerbuilder run mode.
I have enclosed the actual information from a debug run. Will apprecaite any hints. Thanks Jim jimo@jdssc.com in ls_mod_string DataWindow.Table.Select="SELECT DISTINCT ~"inv_dtl~".~"inv_id~", ~"inv_dtl~".~"orig_cost~", ~"inv_dtl~".~"last_cost~", ~"inv_dtl~".~"regular_cost~", ~"inv_dtl~".~"orig_price~", ~"inv_dtl~".~"current_price~", ~"inv_dtl~".~"sugg_price~", ~"inv~".~"vend_id~", ~"inv~".~"style~", ~...

Select in Powerbuilder Database painter WORKS but does NOT in Powerbuilder run mode.
I have enclosed the actual information for a debug run. Will apprecaite any hints. Thanks Jim jimo@jdssc.com in ls_mod_string DataWindow.Table.Select="SELECT DISTINCT ~"inv_dtl~".~"inv_id~", ~"inv_dtl~".~"orig_cost~", ~"inv_dtl~".~"last_cost~", ~"inv_dtl~".~"regular_cost~", ~"inv_dtl~".~"orig_price~", ~"inv_dtl~".~"current_price~", ~"inv_dtl~".~"sugg_price~", ~"inv~".~"vend_id~", ~"inv~".~"style~",...

Exchanging Data Between Two PowerBuilder Applications
This is a multi-part message in MIME format. ------=_NextPart_000_0265_01C4F318.55FDAF30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello. I am trying to figure out a way to send a String from one = running PB application to another running PB application. From my = research so far, it looks like the SendMessage API call comes close, and = I think it might actually do the trick if I were sending a Long instead = of a String. However, I definitely need to send character data, and I = am unable to come up with a solution...

powerbuilder and MySql
when i try to create a new datawindow, it says my tables have no columns. does anybody know what configuration i need to get pb6 to read the column names off a mysql table? it may be an odbc configuration issue too. i was unable to find any info on the net about it. any help is greatly appreciated. thanks, bill -- www.bellanet.com - very nice web hosting services - web application services www.giftsgalore.com : www.longboys.net telnet://undying.longboys.net:4000 http://undying.longboys.net i found out why, just dont know how to fix it. my tablenames...

Use PowerBuilder DLL in PowerBuilder
We use PB6.5. We would want to use a DLL create from PB in a PB application. We compiled an a PBL as DLL. After we tried to use DLL in a user object external, but without success. How can we do to use DLL create from PB or use in a new PB application some object (visual and no) before compiled with PB? Any help will be appreciated. Saul.Convalle@mail.cec.it Thanks When you create a DLL from a PB library it is not really a standard Windows DLL. I'm not sure what the difference is. If you are making calls from PB then just use the standard PB calling syntax the ...

MySQL and PowerBuilder?
Hi all, I've problem connecting PB9 to mysql, does anyone have expirience connecting PB to mysql? The problem is that DBPainter cannot work, either to create table or just to view a table that create outside DBPainter. I'm using PB903 build 8836, DB mysql 5.0.67 using mysqlconnector odbc 5.1.5 on XP TIA If the table you created outside PB is all lower case, the dbpainter assumes that it is a 'system table'. You would need to enable system tables by right clicking the tables folder and choosing Show System Tables. To allow the dbpainter to create ta...

Powerbuilder 5 to Powerbuilder 10
Hi all We have migrated our application from powerbuilder 5 to powerbuilder 10. after migration to version 10, alignment in most of reports disturbed. please advice me some solution. On Fri, 29 Feb 2008 12:45:01 +0100, Adnan Jamil <adnanjamil@nji.com.pk> wrote: > Hi all > > We have migrated our application from powerbuilder 5 to powerbuilder 10. > after migration to version 10, alignment in most of reports disturbed. > please advice me some solution. Adnan, Is this a SQL Anywhere question? If not, you have posted to the wrong forum. If yes,...

mysql: how do i go about retrieving data from a mysql database?
Hi all,Using vb.net, whats the best way to get data from a mysql database? I want to write a class that does this for me http://www.mysql.com/products/connector/net/ Download MySQL connector from above link, reference it in your project and put it in the Bin folder of your project. Make a connection string in your web.config, and build a data class and a data access class in your preferred language. The data class being a representation of your table, and the data access class recieving the data object as a parameter to its insert, delete and update functions. Then link an objectdatasour...

Upgrade to PowerBuilder 9 or PowerBuilder 10?
Hi, Our company is going to upgrade PowerBuilder. Currently we are using version 7, and we are going to upgrade either to version 9 or 10. Does anyone have any recommendations if we should go for version 9 or 10? What is the current release of version 10, and is it stable or is there a lot of bugs? Best regards, Ronald Ommundsen e-mail: ronald.ommundsen@gard.no Ron; If you have any hope of running the applications in the future on XP, W2003 or soon to be W2006 (LongHorn) you will have to jump over to UniCode - ie PB10. So personally, I would recommend starting with P...

Web resources about - MYSQL and PowerBuilder data exchange - sybase.powerbuilder.database

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/5/2015 6:38:05 PM