BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 08-26-2008, 01:26 AM   #1
dhanashree.rao
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: java developer
Posts: 5
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
Happe79
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: IT
Posts: 21
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
dhanashree.rao
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: java developer
Posts: 5
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
Happe79
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: IT
Posts: 21
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
dhanashree.rao
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: java developer
Posts: 5
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
Happe79
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: IT
Posts: 21
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
dhanashree.rao
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: java developer
Posts: 5
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
Happe79
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: IT
Posts: 21
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
dhanashree.rao
New Member
 
Join Date: Aug 2008
Model: 8100
PIN: N/A
Carrier: java developer
Posts: 5
Default

Thanks Happe,
i will definatly try it.
Offline  
Old 09-12-2008, 10:30 AM   #10
qc_metal
CrackBerry Addict
 
qc_metal's Avatar
 
Join Date: Mar 2005
Location: Rockford, IL
Model: 9530
OS: 4.7.x
Carrier: Verizon
Posts: 590
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Vintage

Vintage "The Wilkins Press" Boston Mass Clipboard Genuine Shannon Early 900"s

$299.95



Vintage 90s Burgundy Day Runner Planner 71872 picture

Vintage 90s Burgundy Day Runner Planner 71872

$39.95



Vintage Simplex 4903-9219 Fire Alarm Horn Strobe Used picture

Vintage Simplex 4903-9219 Fire Alarm Horn Strobe Used

$24.95



Boho Print Poly Mailers Plastic Envelopes Shipping Bags Custom #SmileMail® picture

Boho Print Poly Mailers Plastic Envelopes Shipping Bags Custom #SmileMail®

$16.95



Authentic VINTAGE

Authentic VINTAGE "Cheryl" Transfer Iron On

$12.00



Vintage Lot Of 2 King Size Sharpie Permanent Markers Chisel Tip Strong Smell  picture

Vintage Lot Of 2 King Size Sharpie Permanent Markers Chisel Tip Strong Smell

$24.98







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