BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 08-26-2008, 01:26 AM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: java developer
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question How to retrieve email address from BES

Please Login to Remove!

Hi Friends,

I want to start a blackberry application to fetch the email addresses from BES. On BES there is mapping of PIN to Email. So can we write any method to retrieve email address mapped on BES by sending some PIN or IMEI number as a parameter on my blackberry application? If anyone knows, please help me.


Thanks in advance

Last edited by dhanashree.rao : 08-27-2008 at 12:51 AM.
Offline  
Old 08-26-2008, 01:54 AM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: IT
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I hope I got your point.

So, you want to get the mail address by sending the PIN of any blackberry?

The only way I know is to check the PIN in the BES database (the "userconfig" in DB "BESmgt").

But maybe there is a better way.

Happe
Offline  
Old 08-26-2008, 02:30 AM   #3 (permalink)
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: java developer
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Happe for ur valuable suggession.
But how can I check in the BES database programatically?
Offline  
Old 08-26-2008, 03:21 AM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: IT
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

In this case you have to develop a Client-Server-Application.

Then you send the PIN from the BB to the server and then the server checks the PIN in the databse (of course you need a sql server authentification to the BES Database).

I know it is tricky but I think there is no way to connect directly from the BB to the BES database.

Happe

Last edited by Happe79 : 08-26-2008 at 03:23 AM.
Offline  
Old 08-26-2008, 03:53 AM   #5 (permalink)
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: java developer
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx Happe.
Do you have any idea to access the server side BES database (directly/indirectly) through any api?

Thanks,
Dhanashree
Offline  
Old 08-26-2008, 04:32 AM   #6 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: IT
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Depends on the programming language you use for the server ;).


If you use Java then you could use Connection Object.

Code:
import java.sql.Connection;
import java.sql.Statement;

Class.forName("com.mssql.jdbc.Driver");
		
String url = "jdbc:mssql://localhost:port/database";
		
Connection con = DriverManager.getConnection( url, username, password);
Statement stmt = con.createStatement();

stmt.execute("SQL Query");
stmt.close();
If you use C# then System.Data.SqlClient.SqlConnection Object is very useful.

Code:
SqlConnection conn = new SqlConnection(CONNSTRING);

SqlCommand cmd = new SqlCommand("SQL Query", conn);
SqlDataReader rdr = cmd.ExecuteReader();

while (rdr.Read())
 {
         String  exchange_server = rdr[0].ToString();
         .
         .
         .
 }
 rdr.Close();

Hope this helps.


Happe
Offline  
Old 08-26-2008, 07:58 AM   #7 (permalink)
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: java developer
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

For a normal database connectivity, we use the above programming technique. Pleses let me know is there any different technique to connect to the BES database. and if the same logic we have to use then what will be the connection string to connect to the BES database?
Offline  
Old 08-26-2008, 08:24 AM   #8 (permalink)
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: IT
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

You mean, you use the java technique?

There shouldn't be a difference. It is a usual MS SQl connection.

The connection string is e.g. "jdbc:mssql://[BESServer]:[BESPort]/BESMgmt"

and the query could be "SELECT MailBoxSMTPAddr FROM UserConfig WHERE PIN LIKE 2100000a"


Maybe take a look in the table UserConfig of BES database before!

Happe
Offline  
Old 08-26-2008, 08:33 AM   #9 (permalink)
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: java developer
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Happe,
i will definatly try it.
Offline  
Old 09-12-2008, 10:30 AM   #10 (permalink)
CrackBerry Addict
 
qc_metal's Avatar
 
Join Date: Mar 2005
Location: Rockford, IL
Model: 9530
OS: 4.7.x
Carrier: Verizon
Posts: 590
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by dhanashree.rao View Post
Hi Friends,

I want to start a blackberry application to fetch the email addresses from BES. On BES there is mapping of PIN to Email. So can we write any method to retrieve email address mapped on BES by sending some PIN or IMEI number as a parameter on my blackberry application? If anyone knows, please help me.


Thanks in advance
See my signature - if for nothing else, there are a ton of SQL queries in the reporting section of BerryStats that may help you with some of the verbage if going the ADO route.
__________________
Provision, maintain, and report on users via web: the NEW BerryStats | FAQ
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Genuine OEM IBM Wheelwriter Printwheel Prestige 12P #1353502
$39.0
Genuine OEM IBM Wheelwriter Printwheel Prestige 12P  #1353502  pictureGenuine OEM 1337761 IBM Easystrike Correctable Ribbon Cassette - Made in USA
$7.75
Genuine OEM 1337761 IBM Easystrike Correctable Ribbon Cassette - Made in USA  pictureVintage OEM ‘IBM 1337765 Easystrike Lift-Off Tape Cassette Made in USA in 1984
$5.0
Vintage OEM ‘IBM 1337765 Easystrike Lift-Off Tape Cassette Made in USA in 1984 pictureOEM CPU FAN & HEATSINK 14R0011 TSQC0039003--IBM SURE POS 4840-563 TOUCH SCREEN
$3.99
OEM CPU FAN & HEATSINK 14R0011 TSQC0039003--IBM SURE POS 4840-563 TOUCH SCREEN pictureIBM OEM STAPLE CARTRIDGE Infoprint 2085/2105 5000 Staples/Box 53P6725 LOT OF 2
$19.99
IBM OEM STAPLE CARTRIDGE Infoprint 2085/2105 5000 Staples/Box 53P6725 LOT OF 2 picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.