VS2005 And SQL Mobile 3.0 - Percent Complete
Nov 4, 2005Hi.
View 3 RepliesHi.
View 3 RepliesI have a default SQL server 2005 setup on my machine.
There is a large database to whom i can connect.
I made my own data by Sql server Mobile on my local machine and then try to connect it
to the the application in visual studio 2005.
But it each time it gives that the port cannot be open.
I am a native client for SQL server.
Do we have any idea how wil i connect to database local to machine with the
application in Visual studio 2005 with C# language.
thanks
Prashant Gupta
The actual message i am getting
Microsoft SQL Native Client Version 09.00.2047
Running connectivity tests...
Attempting connection
[Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53].
[Microsoft][SQL Native Client]Login timeout expired
[Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
TESTS FAILED!
Dear ppl,
I am writing an application for a device (MDA Pro T-Mobile) having Windows Mobile 5.0 using
-MS .NET Compact Framework 2.0 SP-1
-SQL Mobile 2005.
-VS 2005 .NET
The application uses Merge Replication. The error occurs in the Synchronise() Method of the SqlCeReplication object.
"SQL Server Mobile encountered problems when opening the database."
repl.AddSubscription(AddOption.CreateDatabase);
repl.Synchronize();
I don't understand why I am having this error. It does create the database on AddSubscription() method but it is failing opening the database on Synchronise(). I have also tried uninstalling and then reinstalling all the SQL Mobile components in the following order.
-sqlce30.wce5.armv4i.cab
-sqlce30.repl.wce5.armv4i.cab
-sqlce30.dev.ENU.wce5.armv4i.cab
However, when i run this application on a device(Dell X50 AXIM) with Pocket PC 2003, it runs fine creating the database and sysnchronising it.
The target platform for the project is Windows Mobile 5.0 Pocket PC SDK.
Does any one have any clue what could be the problem ?
Regards
Nabeel
I am migrating a pocket PC application from VS 2003 to VS 2005 and a few weeks ago I hit the following problem when replicating
A SQL Mobile DLL could not be loaded. Reinstall SQL Mobile. [ DLL Name=sqlceca30.dll]
Scanning forums for help I saw that other people had had this problem and one
http://www.eggheadcafe.com/aspnet_answers/NETFrameworkCompactFramework/Feb2006/post25814466.asp
suggested that this problem could be circumvented by getting the replication object early and then continuously using the same object for subsequent replications.
I did this and it works a lot better now but ever so often I get another error which is
Native Error 28559 SQL Mobile encountered problems when opening the database
My only option at this point is to stop and start the application which cures the problem.
Hello,
I am developping a non-managed C++ application for PocketPC using a SQL Server mobile database.
The application is compiled for PocketPC 2003 and uses SQL Server Mobile v2. I use Visual Studio 2005. But I need to compile the application for Windows Mobile 5.0 devices. So I installed the WM5 SDK and had the WM5 into my project configuration.
The "ssceoledb.h" which I include incluses the "transact.h" file. But my problem is that this file is only provided with the PocketPC 2003 SDK and not in the WM5 SDK.
So I cannot use the WM5 configuration project with SQL Server. I also tried with the last SQL Server Mobile 2005 (ie v3.0) and the "ssceoledb30.h" also includes "transact.h".
Did I miss something to install ?
Do you know how I can resolve the problem ?
By advance, thank you for any answer.
--
Gregoire
Using MS VS 2005 (incl SQL Server Mobile)
MS Pocket PC 2005 SDK
I am working on a project that builds for Pocket PC on both Mobile 2003 and Mobile 5. The project uses/will use SQL Server Mobile to store local data.
Project created from new with support for both platforms. I include required header files ssceerr30.h and ssceoledb30.h.
Project builds fine in WM2003 configuration, release and debug.
When I build for WM5 the compiler cannot find the header file transact.h. This is included from within ssceoledb30.h. Same as under WM2003.
In WM2003 configuration if I highlight the ssceoledb30.h include in Visual Studio and open the header, it takes me to <Visual Studio dir>SmartDevicesSDKSQL ServerMobilev3.0. I then locate the include for transact.h and do the same, which takes me <Visual Studio dir>SDKPocketPC2003include. The file exists.
If I repeat the above 'browsing' under the WM5 configuration, ssceoledb30.h takes me to a different copy in the WM5 SDK directory. There is no diff between the file here and the other copy used by WM2003. If I attempt to open transact.h - file does not exist.
Fix (which I'm not too sure about, i.e. is it OK?) - If I copy transact.h to the WM5 SDK directory, the project builds.
Why has transact.h disappeared from WM5 SDK?
I can find no ref's to this problem anywhere. Is my installation of the WM5 SDK corrupt? What else could I be missing?
Is there a sample for SQL Server mobile (like the NorthwindOLEDB sample) that comes configured to build for WM5?
It is possible to access a Sql Server 2005 Mobile database in a VS2003 application (compact framework) ?
Thanks
Robson
I receive error 25123 on my PPC (audiovox 6600) in a reproducable way (usually) with .net 2.0 application that is using SQL CE that I wrote:
Open the application
Connect to the database
Close the applicaton
Re-Open the application
Connect to the database <-- Error occurs
I will also receive the error if my application isn't the first application launched (or very close to the first to launch).
I don't believe it's a memory issue as according to the memory manager I have plenty of memory:
At boot up only start screen items loaded: 18.46 Used 49.89 Free
Launch Resco File Explorer to click EXE: 19.18 Used 49.18 Free
Launch my application (no DB connection): 23.64 Used 44.71 Free
Connect to the DB and do select count(*) from a table with 0 rows: 26.27 Used 42.08 Free
Close the application (this.Close() on the form: 19.38 Used 48.97 Free
Relaunch App and connect to DB receive error: around 38 Used around 30 free
I was unable to reproduce the issue right now while typing this message, the last sets of numbers are from memory, and include other applications that are currently running.
The only way I have to get SQL CE to load again is to soft reset the PPC. If the application is able to connect to SQL CE at least once it is fine up till I close it and re-open the application. So it either connects and runs great, or it can't connect at all.
Any help in resolving this issue would be greatly appreciated.
Wayne
Hi folks, I'm new to Windows Mobile progamming, and new to this forum. Apologies in advance if I'm asking a boneheaded question, but I've done searches and can't find anything directly applicable to my problem.
I'm currently walking through the published MS tutorial in setting up an SQL Server 2005 Mobile application that subscribes to a publication on SQL Server 2005 to exchange information.
I've gotten almost all the way through... successfully set up the server components, creating the publication, etc. On the mobile side, I've been able run the cab files to install the SQL Mobile components and to create the project, add the reference to the dll, and instantiate an engine object. It compiles.
The step in the tutorial after that, though, where you specify the data source from the "data" menu, I've got a problem. When I try to use the "new connection" dialog from choosing the data connection, "MS SQL Server Mobile Edition" doesn't show up as a choice. I've tried choosing any of the other combinations, and in teh subsequent "Connection properties" section my database, SQLMobile (as in their sample) is available, but I get an error when I choose it and click OK. Clicking on "Test Connection" gives me a connection successful message.
My guess is that something about the Mobile server side components is not installed correctly on my development machine, but honestly I have no idea how to begin to fix it. Has anyone seen this problem before and know how to resolve it?
Your time and any knowledge sharing is greatly appreciated.
Thank you,
-Dana
This is a great tutorial and it's a shame one of the more important steps was missed.
In the €œCreate the snapshot user€? section you you find the steps to create the snapshot_agent account. Then in the €œCreate the snapshot folder€? section you find the share and folder permissions. However, at no point do the instructions advise you about adding the snapshot_agent to the SQL Server Logins. The result is that agent cannot perform the initial snapshot but you won't find this out until 50 steps later after Step 10 in the section €œCreate a new subscription".
To get back on track, openthe Object Explorer's Security section and add the snapshot_agent to your logins. Then using the "User Mappings", set an appropriate level for the SQLMobile database role. Once completed you then need to run the agent.
Right-click the SQLMobile publication you created and select "View Snapshot Agent status". From that dialog you can select "Start" to run the agent. When it completes, you can return to the tutorial section "Create a new subscription" and continue with the tutorial.
I am studying the tutorial in SQL Server 2005 Mobile Edition Books Online, and the topic is Creating a Mobile Application with SQL Server Mobile. I have got a problem when creating a new subscription after created a new SQL Server Mobile database. And the problem is shown below:
New Subscription Wizard
- Beginning Synchronization (Success)
- Synchronizing Data (100%) (Error)
Messages
* Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
HRESULT 0x80004005 (29061)
* 無法完æˆ?作æ¥ã€‚
- Finalizing Synchronization (Stopped)
- Saving Subscription Properties (Stopped)
Before I have met this problem, I have finished all the task. And I can browse the localhost web site by using anonymous account even I use internet explorer or browse the directly in IIS.
Does anyone can solve it?? Thank you very much~~~
I have the following query where I am selecting the random row. However I need to select 10% randon rows from the tables. How do I do this?
select top 1 *
from table
ORDER BY NEWID()
I need rate to be a percent, it is returning 1 where XX=YY (e.g 100/100=1), but when the number (rate) is a fraction (90/100=.9)I am getting 0. Don't know what the problem is.
select XX as X, YY as Y, (YY/XX) as rate from blah where blah group by XX, YY order by XX
Hi,
View 3 Replies View RelatedHi all
whether using TOP clause in SELECT statement or [SET ROWCOUNT n] before SELECT statement, I want to know how SqlServer Behave?
whether Fetching data and then choosing n record of them or as soon as fetching n records , Sql Server Stops retrieving the rest of the data?
Thanks in advance.
Regards.
I have questions table and questions are categorized. I want to query say Top 10 questions but with some percentage based on category. For example, if I have 10 questions in category 1 and 50 questions in category 2 than when I select Top 10 with some percentage I want to come out more questions from category 2 than category 1.
View 6 Replies View RelatedI'd like to understant the Percent Log Used behavior...
I monitored the Percent Log Used. For a specific database, it was 50 % used. I backup up the transaction log and the Percent Log Used was still 50 % used. For another database, the log was 60 % used. After the backup, it was 80 % used!!!!
Would you help me to understant this situation?
Thank you,
Fabio
Hi,
How can I convert my number results to Percent (%) with 2 decimal places?
Thanks
I am trying to take a string code seen below that gives me the income over a 12 month time frame but now I need to take this string and divide it by the acqcost. and it will not let me can you please take a look at this and see whats wrong.
(This string is what gives me the income)
=sum(Fields!Total.Value)-Sum(IIF(Fields!eqprecdt.Value< #6/1/2007#,Fields!bookvalue.Value* 0.07,Fields!bookvalue.Value* 0.07*-1 * datediff("d",#5/31/2008#,Fields!eqprecdt.Value)/365))
(This string is the acq cost)
SUM(Fields!acqcost.Value)
Hi..
I have basic level question..
Why would we use SELECT TOP 100 PERCENT in a SQL Server 2000 query?
T.I.A
Papillon
Hi all
As you are aware we have TOP n [Percent] keyword that is used in Select statements ,I have a question??
When this keyword is evaluated by Sql-Server, after retreiving all Query-Result or upon the number of results reach to the specified number,sql-server stops
retrieving the rest of record.?
Thanks in advance.
regards.
hai everybody,
i have doubt With the Top(n) percent keyword
for example consider the table employee with following details i'm using a query
SELECT TOP(19) PERCENT * FROM Employee
if i execute this query im gettin 2 record set whose id is less than
6
SELECT TOP(19) PERCENT * FROM Employee WHERE ID <6
like wise if i execute the above query i'm gettin only one record set instead of two record set ...
why so, can anyone help me on this??...
id name salary st_date city region
1Jason404201994-02-01 00:00:00.000New YorkW
2Robert144201995-01-02 00:00:00.000VancouverN
3Celia240201996-12-03 00:00:00.000TorontoW
4Linda406201997-11-04 00:00:00.000New YorkN
5David800261998-10-05 00:00:00.000VancouverW
6James700601999-09-06 00:00:00.000TorontoN
7Alison906202000-08-07 00:00:00.000New YorkW
8Chris260202001-07-08 00:00:00.000VancouverN
9Mary600202002-06-09 00:00:00.000TorontoW
Thanks in Advance
I a bit of newbie making reports and I cant figure out how to calculate the Percent of Total on a report. Assuming I have a field in my datatable called Color, I simply want to create a report that counts the occurences of each color and then perform a calculation as to what percent of the total that each of the colors make up. Basically a report that looks like this....
Color Count Percent
Red 50 25%
Blue 100 50%
Green 50 25%
Total 200
I have a table that has a header, a grouping row based on Color, and a footer. So using the report expressions, my table looks like this
Color Count Percent
=Fields!Color.Value =Count(Fields!Color.Value) WHAT EXPRESSION GOES HERE?!?!?!
Thanks!!!
Mike
I have a table of data, shown below that is composed of a scoreid, player id, and score. Using the following SQL Query:
"Select Top 50 Percent(score), playerid, scoreid from TScores
where playerid = 5
order by score"
I can get the lowest 50% of player number 5's scores.
How do I rewrite the query to give me each individual player's top 50 percent.
ScoreID
PlayerID
Score
10166
2
84
10167
2
80
14921
2
89
15069
2
95
13575
3
81
14282
3
84
12989
3
84
15821
3
89
16795
3
87
16950
3
85
17567
3
87
16948
5
79
16622
5
82
16590
5
85
11335
5
87
14279
5
82
13589
5
75
13973
5
77
15513
5
77
10070
5
81
10071
5
85
10049
6
86
10050
6
85
10051
6
98
16712
6
85
16710
6
85
I have a script file which do the replication and in the script there is a lot of table need to be addad as article.
So while use osql execute the script there would be cost a lot of time. What I want to do is show a dialog which could show the progress percent and the file name which is now being addad as article.
hwo can i use Transact-SQL to do this?
Thanks a lot
I am trying to use this command to change the variable in where clause each time:
psexec servername -E cmd.EXE /c "sqlcmd -S servername /E -d dbname -v entertext="'%anything%'" -i c:myfoldermyscript.sql -o c:mypathoutput.sql"
myscript.sql is like:
select * from table_name
where summary like $(entertext);
This command works just for variables with single and exact word. It does not work for variables which has space between them or when I enter part of summary.In fact, I wanted to write something which the user be able to enter variable each time when he/she run this batch file. because I put this sqlcmd command in batch file( like this in oracle: "select * from table_name where summary = &entertext; " I was looking the same command in sql server , but I did not find it). I do not know .net or any other programing language( I know just csh and command line). I want to do this just with sql command.
I have a question about rounding and converting to percentage and adding in the '%'..This is my original code
SELECT * FROM
( SELECT Baby,
CAST( CAST( SUM(TotalBaby) AS DECIMAL )/ CAST( SUM(TotalParent) AS DECIMAL) AS DECIMAL(10,4)) as BabyValue
FROM NewBorn
WHERE Category = 'Boy'
[code]....
But I also need my data to have the '%' and it should have 2 decimal place which is as below, I have tried to make it this way
CAST( CAST( SUM(TotalBaby) AS DECIMAL )/ CAST( SUM(TotalParent) AS DECIMAL) AS DECIMAL(10,4)) * 100 + '%' as BabyValue
But it prompt me the error 'Error converting data type varchar to numeric.'
A B C D
0.22%0.29%0.11%0.32%
I am using SQL Server and have a table that is currently set to decimal(5,2) as the datatype. I am using Tableau as my front-end and if I create a dashboard, I can see my fields like 65.25, 65.72, etc. I want to view them as 65.25% however when I change the data type in Tableau to a %, it shows up as 6525.25%. Is there a way in the SQL Server side to change the column so it shows as a percent? I am sure the answer is no because I have never seen that. Only seen decimal values. Maybe I need to change it to decimal 2.2 if that even exists.
View 3 Replies View RelatedI have a data containing salesman who can belong to groups. The groups have "split" values but the splits are not on a percent basis. Can I create a query to get the percentage in a column? Please look at the table below and my attempted query.
Salesman GroupSplitSplitPercent
AG110.33
BG110.33
CG110.33
YG20.50.5
ZG20.50.5
UPDATE Splits
SET SplitPercent = Split / (SELECT SUM(Split) FROM Splits GROUP BY Splits.Group HAVING Splits.Group = ???)
Hi!How can I get percent of executed procedure in MSSQL Server, lik inEnterprise Manager and/or dbMgr2k ?I use Visual C# and MSDE.Thank's for help, gregory
View 1 Replies View Related
Hello,
This is my issue. I have values in my table that I need to format as a percent. So when I use the FormatPercent() function, it works but if one of the records has no value for that field. It generates a #Error message in that textbox. I tried using an if statement and that didn't work either. Someone please help me with this. Any information is appreciated.
I am trying to get a percent of a group on a row level. I want 62.77% or = sum(totaldeals, "Status") / sum(totaldeals, "Product"). It seems real easy but I have not been able to come up with a solution for it.
Any one have any ideas?
Product is a group, status is a group, total deals is a sum. The reason for a matrix is because I have fiscal year, fiscal quarter, fiscal month, and additional product lines coming on board. Matrix is the way to go for sum but I can't seem to get the % by product.
I was able to get the % on the row level but based on the report total with the following code:
=IIF(Sum(Fields!GrossSales.Value,"matrix1_Product")=0,0,Sum(Fields!GrossSales.Value)/IIF(Sum(Fields!GrossSales.Value,"matrix1_FianceStatus")=0,1,Sum(Fields!GrossSales.Value,"matrix1_FinanceStatus")))
This is the concept of what I am trying to do but I want it based on the on the product level sum not the matrix level sum. I tried changing the scopes of the above expression with no luck. I have tried adding inscope("") with no luck.
Product
Status
Total Deals
Total Dollar Amount
% of Total Dollars
Windows
A
1,748
$10,760,596
62.77%
C
286
$1,821,487
10.63%
F
331
$1,980,658
11.55%
H
P
-
$0
0.00%
Y
399
$2,579,597
15.05%
Total
2,764
$17,142,338
100.00%
I am having a problem retaining the right 2 decimal places in my datagrid field. I have it defined as a decimal but when the update happens it rounds the decimal places back to .00.
Dim NewMarkup As String
'retrieve the new values
NewMarkup = CType(e.Item.FindControl("Markup"), TextBox).Text
'create the ado.net objects
Dim command As New SqlCommand("UpdatePricing", connection)
command.CommandType = CommandType.StoredProcedure
'parameters
command.Parameters.Add("@Markup", SqlDbType.Decimal, 5)
command.Parameters("@Markup").Value = CDec(NewMarkup)
Thanks!