BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 06-16-2005, 05:23 PM   #21
jibi
BlackBerry God
 
jibi's Avatar
 
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 8900
OS: 4.6.1.174
Carrier: AT&T
Posts: 11,310
Default

Please Login to Remove!

I would think it would be simple enough to write something into the ASP script for an If/Then/Else replace statement to handle the number conversions, no? Of course, my coding clases aren't really coming back to me all that much these days... heh.
__________________
In the beginning the Universe was created. This has made a lot of people very angry and is widely regarded as a bad move.
Offline  
Old 06-16-2005, 05:32 PM   #22
jibi
BlackBerry God
 
jibi's Avatar
 
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 8900
OS: 4.6.1.174
Carrier: AT&T
Posts: 11,310
Default

I compressed your screenshot and emailed it to you. 7MB is a wee bit too big for most people
__________________
In the beginning the Universe was created. This has made a lot of people very angry and is widely regarded as a bad move.
Offline  
Old 06-16-2005, 06:25 PM   #23
Grimlin
CrackBerry Addict
 
Grimlin's Avatar
 
Join Date: Jun 2005
Location: Signal Mountain, TN
Model: K1
PIN: Positive Intrinsic Negative???
Carrier: T-Mobile
Posts: 728
Default

Quote:
Originally Posted by jibi
I would think it would be simple enough to write something into the ASP script for an If/Then/Else replace statement to handle the number conversions, no? Of course, my coding clases aren't really coming back to me all that much these days... heh.
You are correct. I just hate customizing that asp page. It was written to be generic and work with any view or table regardless of the columns or content. I'll post the the code snippet for the change if you want / need. You can just fill out the Case statement with the values as we find them. The anal retentive side of me that likes the generic ASP is going into convulsive fits as I type...
__________________
KEYone
Classic,Q10,Z10,9900,9670,9810,9800,9700,
8220,9000,8820,8800,7270,8700c,7290,7230,
7510,6510,5810,957,857,950
Offline  
Old 06-16-2005, 06:29 PM   #24
Grimlin
CrackBerry Addict
 
Grimlin's Avatar
 
Join Date: Jun 2005
Location: Signal Mountain, TN
Model: K1
PIN: Positive Intrinsic Negative???
Carrier: T-Mobile
Posts: 728
Default

The real question is is anyone running a resolution that allows them to view it full size without scrolling?

I tried to compress the jpg to get it small enough to attach to the post, but had no luck even at the lowest setting. So when I gave up and dropped it on my site, I decided to use high quality. I'll post one for the bandwidth challenged users later.
__________________
KEYone
Classic,Q10,Z10,9900,9670,9810,9800,9700,
8220,9000,8820,8800,7270,8700c,7290,7230,
7510,6510,5810,957,857,950
Offline  
Old 06-17-2005, 04:19 PM   #25
jibi
BlackBerry God
 
jibi's Avatar
 
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 8900
OS: 4.6.1.174
Carrier: AT&T
Posts: 11,310
Default

Quick favor though, and on a related note as the above status conversions, since I know nothing of ASP. Can you pull the stat for the BlackBerry instance name, dbo.UserConfig.ServerConfigId and have it convert the value (1, 2, etc) to a static entry inputted by the user (obviously, they'd have to edit the ASP code for these values)?

So if there were users on BESPROD1 with ServerConfigId of 1, and users on BESPROD2 with ServerConfigId of 2, then the display on the page would read BESPROD1 or BESPROD2 and not 1 or 2.

I have one of our web developers looking at it in his spare time, but in case he never gets around to it, and if its something you could possibly do...
__________________
In the beginning the Universe was created. This has made a lot of people very angry and is widely regarded as a bad move.

Last edited by jibi; 06-17-2005 at 07:22 PM..
Offline  
Old 06-17-2005, 04:23 PM   #26
Grimlin
CrackBerry Addict
 
Grimlin's Avatar
 
Join Date: Jun 2005
Location: Signal Mountain, TN
Model: K1
PIN: Positive Intrinsic Negative???
Carrier: T-Mobile
Posts: 728
Default

Wirelessly posted (BlackBerry7290/4.0.0 Profile/MIDP-2.0 Configuration/CLDC-1.1)

Will post the code snippet tonight. I'm on Berry, driving and listening to a podcast so coding would be pushing it.
__________________
KEYone
Classic,Q10,Z10,9900,9670,9810,9800,9700,
8220,9000,8820,8800,7270,8700c,7290,7230,
7510,6510,5810,957,857,950
Offline  
Old 06-17-2005, 05:45 PM   #27
jibi
BlackBerry God
 
jibi's Avatar
 
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 8900
OS: 4.6.1.174
Carrier: AT&T
Posts: 11,310
Default

haha. I got it, but see if you can do anything better (hehe). He changed this (places it in the second column, or perhaps its wherever its designated within the view?).

Be sure the view includes dbo.UserConfig.ServerConfigId within the initial column designation string.

Code:
						<TR>
			<%For COL = 0 to UBound(COLS,2)%>
				<%If ROW > 0 Then	'Set up TD coloring for odd numered rows
					If ROW/2 = Int(ROW/2) Then 'Even, don't color %>
						<TD Align="Left">
					<%Else%>
						<TD BGCOLOR="#C0C0C0" Align="Left">
					<%End If%>
				<%Else%>
						<TD Align="Left">
				<%End If%>
						<%
							If IsNull(Data(COL,ROW)) or Trim(Data(COL,ROW)) = "" Then
								Response.Write("&nbsp")
							ElseIF Trim(COLS(0,COL)) = "Server" and Trim(Data(COL,ROW)) = "1" Then
								Response.Write("<A Href='lite.asp?Server=1'>SERVER1</A>")
							ElseIF Trim(COLS(0,COL)) = "Server" and Trim(Data(COL,ROW)) = "2" Then
								Response.Write("<A Href='lite.asp?Server=2'>SERVER2</A>")
							Else							
								Response.Write("<A Href='lite.asp?" & COLS(0,COL) & "=" & Data(COL,ROW) & "'>" & Data(COL,ROW) & "</A>")
							End If
						%>

						</TD>
			<%Next%>
						</TR>
		<%Next%>
__________________
In the beginning the Universe was created. This has made a lot of people very angry and is widely regarded as a bad move.

Last edited by jibi; 06-17-2005 at 06:08 PM..
Offline  
Old 06-17-2005, 05:55 PM   #28
jibi
BlackBerry God
 
jibi's Avatar
 
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 8900
OS: 4.6.1.174
Carrier: AT&T
Posts: 11,310
Default

and this for lite.asp:

Code:
						<%
							If 

IsNull(Data(COL,ROW)) or Trim(Data(COL,ROW)) = "" Then
								

Response.Write(COLS(0,COL) & ":<BR>")
							ElseIF 

Trim(COLS(0,COL)) = "Server" and Trim(Data(COL,ROW)) = "1" Then
								

Response.Write(("Server: SERVER1") & "<BR>")
							ElseIF 

Trim(COLS(0,COL)) = "Server" and Trim(Data(COL,ROW)) = "2" Then
								

Response.Write(("Server: SERVER2") & "<BR>")
							Else
								

Response.Write(COLS(0,COL) & ": " & Data(COL,ROW) & "<BR>")
							End If
						%>
__________________
In the beginning the Universe was created. This has made a lot of people very angry and is widely regarded as a bad move.
Offline  
Old 06-17-2005, 10:29 PM   #29
Grimlin
CrackBerry Addict
 
Grimlin's Avatar
 
Join Date: Jun 2005
Location: Signal Mountain, TN
Model: K1
PIN: Positive Intrinsic Negative???
Carrier: T-Mobile
Posts: 728
Default

I was in the process of rewriting it when I went out and looked at what you are talking about. I will finish the code so that we can use it as a custom lookup for the status that isn't in the database. However, for this one, why not just change the SQL view to include the Server config table? Like this:

Code:
SELECT     SUBSTRING(CONVERT(nchar(100), UserConfig.ServerDN), 54, 3) AS Site, ServerConfig.ServiceName, UserConfig.DisplayName, UserConfig.PIN, 
                      SyncDeviceMgmtSummary.ModelName, SyncDeviceMgmtSummary.HomeNetwork AS LastNetwork, UserStats.MsgsPending AS Pending, 
                      UserStats.MsgsForwarded AS Rcvd, UserStats.MsgsSent AS Sent, UserStats.MsgsExpired AS Expired, UserStats.MsgsFiltered AS Filtered, 
                      RTRIM(CONVERT(nchar(10), DATEDIFF(hh, UserStats.LastFwdTime, GETUTCDATE()) / 24)) + ' Days' + ' ' + RTRIM(CONVERT(nchar(10), DATEDIFF(mi, 
                      UserStats.LastFwdTime, GETUTCDATE()) / 60 - DATEDIFF(hh, UserStats.LastFwdTime, GETUTCDATE()) / 24 * 24)) + ' hrs' AS Inactive, DATEADD(hh, 
                      DATEDIFF(hh, GETUTCDATE(), GETDATE()), UserStats.LastFwdTime) AS LastRcvd, DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), GETDATE()), 
                      UserStats.LastSentTime) AS LastSent, UserConfig.MailboxSMTPAddr AS SMTP, SUBSTRING(CONVERT(nchar(100), UserConfig.ServerDN), 51, 10) 
                      AS ExchServer, SyncDeviceMgmtSummary.AppsVer, SyncDeviceMgmtSummary.PhoneNumber, SyncDeviceMgmtSummary.DCID, 
                      SyncDeviceMgmtSummary.IMEI, SyncDeviceMgmtSummary.ITPolicyName, SyncDeviceMgmtSummary.FlashSize / 1048576 AS Memory, DATEADD(hh, 
                      DATEDIFF(hh, GETUTCDATE(), GETDATE()), UserConfig.CreationTime) AS Creation, DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), GETDATE()), 
                      UserConfig.ActivationTime) AS Activation, DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), GETDATE()), UserConfig.KeyDate) AS KeyGen, DATEADD(hh, 
                      DATEDIFF(hh, GETUTCDATE(), GETDATE()), SyncDeviceMgmtSummary.HandheldConfigCheckTime) AS LastUpdate
FROM         ServerConfig RIGHT OUTER JOIN
                      UserConfig ON ServerConfig.Id = UserConfig.ServerConfigId LEFT OUTER JOIN
                      UserStats ON UserConfig.Id = UserStats.UserConfigId LEFT OUTER JOIN
                      SyncDeviceMgmtSummary ON UserConfig.Id = SyncDeviceMgmtSummary.UserConfigId
__________________
KEYone
Classic,Q10,Z10,9900,9670,9810,9800,9700,
8220,9000,8820,8800,7270,8700c,7290,7230,
7510,6510,5810,957,857,950
Offline  
Old 06-18-2005, 12:20 AM   #30
Grimlin
CrackBerry Addict
 
Grimlin's Avatar
 
Join Date: Jun 2005
Location: Signal Mountain, TN
Model: K1
PIN: Positive Intrinsic Negative???
Carrier: T-Mobile
Posts: 728
Default

Ok, I recoded it. I don't like it as it makes the ASP a bit messy, but it does extend the functionality without making us create a new lookup table in the BES database. You can now create a Case statement for a fieldname and create your own replacement values in the code. The ugly part is you have to do it in both pages. I probably could write it into an #include and another file that they share, but not tonight.

http://www.thegrims.com/berrystats/Berrystats.zip
__________________
KEYone
Classic,Q10,Z10,9900,9670,9810,9800,9700,
8220,9000,8820,8800,7270,8700c,7290,7230,
7510,6510,5810,957,857,950
Offline  
Old 06-18-2005, 08:56 AM   #31
jibi
BlackBerry God
 
jibi's Avatar
 
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 8900
OS: 4.6.1.174
Carrier: AT&T
Posts: 11,310
Default

hehe, thanks very much good sir.

p.s-its ASP code - how could you ever make it messy
__________________
In the beginning the Universe was created. This has made a lot of people very angry and is widely regarded as a bad move.
Offline  
Old 06-18-2005, 09:26 AM   #32
Grimlin
CrackBerry Addict
 
Grimlin's Avatar
 
Join Date: Jun 2005
Location: Signal Mountain, TN
Model: K1
PIN: Positive Intrinsic Negative???
Carrier: T-Mobile
Posts: 728
Default

Quote:
Originally Posted by jibi
hehe, thanks very much good sir.

p.s-its ASP code - how could you ever make it messy
Actually I was referring to the fact that it UNGenerecizes (I made a new word!!!) that page. ...but I just got drunk and started coding so it all worked out...

Let me know if I screwed anything up. I forgot to keep in the part I made for you about the BES Server name. You'll have to get the SQL from the post above.
__________________
KEYone
Classic,Q10,Z10,9900,9670,9810,9800,9700,
8220,9000,8820,8800,7270,8700c,7290,7230,
7510,6510,5810,957,857,950
Offline  
Old 06-18-2005, 10:01 AM   #33
jibi
BlackBerry God
 
jibi's Avatar
 
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 8900
OS: 4.6.1.174
Carrier: AT&T
Posts: 11,310
Default

haha. not a prob. thanks again for your hard work!
__________________
In the beginning the Universe was created. This has made a lot of people very angry and is widely regarded as a bad move.
Offline  
Old 06-21-2005, 04:03 PM   #34
cayzac
Talking BlackBerry Encyclopedia
 
cayzac's Avatar
 
Join Date: Dec 2004
Location: South Carolina
Model: Curve
Carrier: AT&T
Posts: 306
Default

Am I doing something wrong here? I can't get to the server.
Offline  
Old 06-22-2005, 12:10 PM   #35
Grimlin
CrackBerry Addict
 
Grimlin's Avatar
 
Join Date: Jun 2005
Location: Signal Mountain, TN
Model: K1
PIN: Positive Intrinsic Negative???
Carrier: T-Mobile
Posts: 728
Default

Quote:
Originally Posted by cayzac
Am I doing something wrong here? I can't get to the server.
My server? Yeah... I forgot to pay up this year and my Domain got bumped from DNS. I payed today and all should be back between now and tomorrow. Sorry. In the meantime if you just really want it, email me at [email address] and I'll send it to you via email.
__________________
KEYone
Classic,Q10,Z10,9900,9670,9810,9800,9700,
8220,9000,8820,8800,7270,8700c,7290,7230,
7510,6510,5810,957,857,950
Offline  
Old 06-22-2005, 06:32 PM   #36
cayzac
Talking BlackBerry Encyclopedia
 
cayzac's Avatar
 
Join Date: Dec 2004
Location: South Carolina
Model: Curve
Carrier: AT&T
Posts: 306
Default

OK, I've got the code now. I'm using a simple Blackberry server setup, still using MSDE. By default its using Windows Authentication. The code seems to be connecting to the database using SQL Authentication. I'm not a SQL guru but I've tried making a connection but keep getting errors. What should the connection string look like in my case? Thanks!
Offline  
Old 06-22-2005, 07:56 PM   #37
jibi
BlackBerry God
 
jibi's Avatar
 
Join Date: Oct 2004
Location: Jibi's Secret Place
Model: 8900
OS: 4.6.1.174
Carrier: AT&T
Posts: 11,310
Default

Do you have TCP/IP enabled for the MSDE database? Go to Start then Run and type in SVRNETCN. Enable it if its not.
__________________
In the beginning the Universe was created. This has made a lot of people very angry and is widely regarded as a bad move.
Offline  
Old 06-22-2005, 08:19 PM   #38
Grimlin
CrackBerry Addict
 
Grimlin's Avatar
 
Join Date: Jun 2005
Location: Signal Mountain, TN
Model: K1
PIN: Positive Intrinsic Negative???
Carrier: T-Mobile
Posts: 728
Default

Quote:
Originally Posted by cayzac
By default its using Windows Authentication. The code seems to be connecting to the database using SQL Authentication.
You'll need to convert it to accept SQL auth. You can do this through Enterprise manager. If you can get to it, look here http://www.thegrims.com/berrystats I have some brief instructions.

If you want to maintain windows auth for this, your web server will have to be a domain controller. If not, the MS double hop authentication restriction will kick in and you won't be able to authenticate to the database.

***EDIT***
OK, really brief. I'll get more in depth later. for now:
Right Click on your BES instance
Click properties
Go to security tab
Select SQL Server and Windows
Click OK

Expand out the tree structure.
Go to Security and the Logins
RightClick logins...New Login
Key in a name
Change to SQL Auth
Key in a password
Go to Database Access
Check BESMgmt
Check Datareader
OK

Done
__________________
KEYone
Classic,Q10,Z10,9900,9670,9810,9800,9700,
8220,9000,8820,8800,7270,8700c,7290,7230,
7510,6510,5810,957,857,950

Last edited by Grimlin; 06-22-2005 at 08:27 PM..
Offline  
Old 06-22-2005, 08:20 PM   #39
cayzac
Talking BlackBerry Encyclopedia
 
cayzac's Avatar
 
Join Date: Dec 2004
Location: South Carolina
Model: Curve
Carrier: AT&T
Posts: 306
Default

It was not enabled, I enabled it and now I'm getting:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/berrystats/index.asp, line 33

Line 33 is "COLS = RS.GetRows(1000)"

Any ideas? I appreciate the help.
Offline  
Old 06-22-2005, 08:27 PM   #40
Grimlin
CrackBerry Addict
 
Grimlin's Avatar
 
Join Date: Jun 2005
Location: Signal Mountain, TN
Model: K1
PIN: Positive Intrinsic Negative???
Carrier: T-Mobile
Posts: 728
Default

Quote:
Originally Posted by cayzac
It was not enabled, I enabled it and now I'm getting:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/berrystats/index.asp, line 33

Line 33 is "COLS = RS.GetRows(1000)"

Any ideas? I appreciate the help.
What happens when you run the view from enterprise manager?
__________________
KEYone
Classic,Q10,Z10,9900,9670,9810,9800,9700,
8220,9000,8820,8800,7270,8700c,7290,7230,
7510,6510,5810,957,857,950
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


Schneider 140CPU65150 Processor/Controller MODICON Quantum NEW picture

Schneider 140CPU65150 Processor/Controller MODICON Quantum NEW

$2835.00



AB 1747-L542 /C SLC 500 5/04 CPU PROCESSOR UNIT 1747L542 NEW Factory Sealed picture

AB 1747-L542 /C SLC 500 5/04 CPU PROCESSOR UNIT 1747L542 NEW Factory Sealed

$380.00



AlphaSmart Neo2 Laptop Word Processor Portable Notebook Pad picture

AlphaSmart Neo2 Laptop Word Processor Portable Notebook Pad

$89.97



Processor SY007 Intel Pentium 100 MHz CPU picture

Processor SY007 Intel Pentium 100 MHz CPU

$11.75



Used & Tested TEKNOR T936IBAAB CPU Single Board picture

Used & Tested TEKNOR T936IBAAB CPU Single Board

$330.91



Used & Tested ABB FSCA-01 Adapter Module picture

Used & Tested ABB FSCA-01 Adapter Module

$181.86







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