C# - RIA Services + Entities - Date Moving 24 Hours Earlier In Client?

Apr 27, 2009

I am currently working on a silverlight project with RIA Services and have seem to come across a bug(or wrote a new one).In a simple query I am retrieving a entity model from the server. In the server side service class a DateTime is correct(to what's in the db) but on the client it seems to go back 24 hours and maybe 10 hours...6/04/2009 12:00:00 AM (Database) turns into 5/04/2009 2:00:00 PM and also displays as 5/4/2009 12:00:00 AM.

View 2 Replies


ADVERTISEMENT

Communications :: Track Entities Id's From Client To Server?

Apr 17, 2012

Well first off let me say I am not sure if this should be in network or game programing but I think network programing is more relevant.

Anyway

I am creating my first game that runs over a network and so far everything is working. I have a server program, the clients can connect and see each other flying around. (weeeee)

However I have hit a wall when trying to make them shoot. The most easy way I can think to do this, is to have the client tell the server �hay i need a bullet pointing at x angle moving at y speed� the server then spawns a bullet entity then sends a spawn entity packet to all the clients. The main problem I see with this, is that the clients gun will have a delay based on latency.(funValue -= 1000)

The only other way I can think to do this, is to have some fake bullets spawn on the client but when the client gets the spawn bullet packet from the server, I am not sure how to keep track of what fake bullets to delete.

View 1 Replies

Add 4 Hours To A Date Time Value

Nov 17, 2009

can anyby help me to add 4 hours to the following date time value [code]

View 4 Replies

Cannot Get The Correct Buildnumber Of The Remote Desktop Services Client

Jul 6, 2010

I want to use the c# write a programe to get the logon session information.I use the WTS_INFO_CLASS Enumeration refrenced to the msdn library,the url link is [URL]

Everything is ok except the WTSClientBuildNumber property. The WTSClientBuildNumber that I get is 5875288,but it should be 6001.I use the 6.0.6001 RDC for my test.Can anyone tell me the problem.

The following is my sample code

If WTSQuerySessionInformation2(ptrOpenedServer, active_session, WTS_INFO_CLASS.WTSClientBuildNumber, istr, returned) = True Then
ClientInfo.WTSClientBuildNumber = istr.ToString()
End If

View 1 Replies

Getting A Unique ID For A Thin Client Running Terminal Services?

Apr 20, 2009

We want to set up a bunch of thin clients linked to a server running server 2003 using terminal services. When the thin client runs our app it needs to know which station it is so it can gather information unique to itself from the database. (IP address?). Our app is written in VB6.

View 3 Replies

Asp.net - Get Difference In Hours/Minutes From Two Date Values?

Apr 11, 2011

I have a date value (e.g. 2011-04-11 07:45:00.000) which I am pulling from my database (via Entity Framework). I need to pull out only the hour from the original date value (e.g. 07:45:00), get the current time, and then subtract the current time from the database time value. In pseudo-code, I'm looking to do something like this:

Dim my_date as DateTime = from_db ' This is the value pulled from the database.Dim this_date as DateTime = Date.Now ' This is pulled via a VB.NET function.Dim my_hour = my_date_but_only_hours ' Somehow, I need to strip the date off the my_date Dim this_hour = this_date_but_only_hours ' Same as line above.Dim hour_difference = my_hour - this_hour Response.Write("There are " & hour_difference & " hours left before the time runs out.")

View 3 Replies

Web Services - .net SOAP Webservice Client "Unmarshalling Error: Unexpected Element?

Jul 28, 2011

I am building a client in VB.net for calling webservices methods from a partner organisation.[URL]../system.web.services.protocols.soaphttpclientprotocol%28v=VS.71%29.aspx because I can't get it to work using the Web References feature of Visual Studio 2010 (when I try to do that it turns the methods from the WSDL into classes).I have created a proxy class and can instantiate an object of that class no problem.

However, when I try to call a method which requires arguments I get this error:

Unmarshalling Error: unexpected element (uri:"http://api.service.apimember.emailvision.com/", local:"key"). Expected elements are <{}key>,<{}login>,<{}pwd> Does anyone have any idea why this might be? (If it's helpful I can post my code and the location of the WSDL.) (P.S. I can get the whole thing to work fine in PHP using ZF Soap classes, but for various reasons I need to get it to work using .Net)

Edit to add: I have used Wireshark to examine the outgoing and incoming SOAP message to compare them with the messages being sent via SoapUI, where it all works fine.What this has shown is that my VB client is sending a message where the namespace of the web service I am trying to access is declared as an attribute of the method, and not in the soap:envelope attributes.

[Code]...

View 1 Replies

VS 2008 - Datediff - Program That Will Count Down The Hours To A Specific Date

Jul 30, 2010

I want to make a little program that will count down the hours to a specific date. I.E. "Hours until: ##/##/##"

Like they do for new year and other big events in the world or whatever but I'm having big problems. I don't know how to use datediff to compare the difference in hours from 1 date to the next.

View 3 Replies

Reporting Services - Handling An Empty Date?

Jul 14, 2010

I have a report parameter which looks like this: 01.01.2009 00:00:00.Its a date (as string), as you might have guessed :). The problem is, this param can be an empty string as well. So I tried those expressions:

=IIf(IsDate(Parameters!DateTo.Value), CDate(Parameters!DateTo.Value), "")
=IIf(Len(Parameters!DateTo.Value) > 0, CDate(Parameters!DateTo.Value), "")

Both dont work and the value for the textfield where I print the expressions result is always #Error. As soon as I remove the CDate stuff, it works, but I have to use it. IS there another way to achieve that? What I want is to display nothing if its not a date or the date (format dd.mm.yyyy) if its a date.

View 2 Replies

Sql - Matrix Reporting Services - Use A Cross Tab Between Store Names And Just The Month Of The Date Field?

Aug 13, 2009

I have a matrix with rows indicating a name (Ex Store name) and I have data pertaining to that in the DATA cells. I also have another date field in this format (MM/DD/YYYY). I would like to use a cross tab between Store Names and Just the Month of the date field.

[code]...

is there any expression I can use to get the month format on the header of column.

View 2 Replies

Adjust Date/time From PDT To Local Time By +-24 Hours?

Feb 10, 2012

I have a program that reads a file with Pacific Daylight Time, I want users to see the time and date in their local environment.

At present I have in Australia a time difference of 18 hours, so I have a list box with -24 to +24 and currently set at 18, my code is elementary as long as I have moved past day one of the month it suits me personally, but I want to distribute my app, so I need something better.

View 11 Replies

Date Conversion Error While Moving To 64 Bit Application Server

Aug 23, 2011

I have a Client/Server application. Both Client & Server use to be in 32-bit machines. Every thing was working fine.

When I moved the "Application Server" to a 64-bit machine, I am getting "Error converting varchar to datetime" in almost every screen that has a date picker in it.[code]...

View 1 Replies

Partial Entity Class With Shared Extension Not Associated With 'other' Partial Class In Client Using RIA Services?

Apr 21, 2011

I have extended an Entity Framework 4 entity class with a calculated property in a partial class. This member is not available on the client to which the entities are exposed via WCF RIA Services.when using C# appears to be changing the extension of the partial class file from .cs to .shared.cs. I tried this with my VB.Net solution (.vb to .shared.vb) and got a long list of errors. I believe what happened is that the partial class lost its association with the entity on the client - it inherited from object rather than EntityObject.

My best guess is that this is related to the way that VB.Net handles namespaces.Each project has a 'Root Namespace' which is prepended to anything that is defined within a code file. C# has a 'Default Namespace'which is the namespace into which new types are placed by default - via a namespace statement within the file.The partial class is probably having the client namespace prepended to it which puts it into a different namespace than the entity with which it is associated on the server.Is there any means of extending an entity in such a way that those extensions are available on the client via WCF RIA Services and VB.Net?

View 1 Replies

Compile Dll As Earlier Build?

Dec 21, 2010

When I try to run the dll I compiled in Visual Studio 2010, I get the following message: This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. I'm guessing this means that I am a too recent version of Visual Studio. Is there a way I can build the dll as an earlier version?

View 1 Replies

Compare DataGridView With Earlier Version?

Feb 17, 2012

I'm working on a program that set up as master/details. I'm working on making save checks in the program, so that if something gets changed, it gives a warning when leaving the form if it hasn't been saved. I've got it mostly working, but I'm having problems with when i get to my details section.

The details section is a DataGridView (DGV) that loads with a one to many relationship. I've got is set up right now that when the form loads, it takes and makes an array call aryOriginals, and as you close the form, it makes another array called aryClosing. It compares these two sets of arrays, and if nothing is different since the page opened, it will close without any problems. If it has been changed, a msgbox pops up to let the user know that there has been a change since they last saved and asks if they want to wait to close the form so they can save.

All of that is working great. What I'm having a problem with is doing the same thing with the datagridview. And before anyone suggests it, I can't use DataSet1.HasChanges, because that was giving me weird problems of saying there were changes when nothing changed due to a custom made combobox i use in a few of my datagridviews. So I need some way of comparing the two datagridviews. I've looked online, but can't seem to find anything with what I'm looking for.

Visual Studio 2010 Pro SP1, SQL Sever 2008 R2, Vb.Net coding

View 10 Replies

Restore Project To An Earlier Time?

Oct 20, 2008

I've made a mess in one of my projects VB2008. Is there any way I can restore my project to an earlier time? Something like the windows restore system?

View 5 Replies

Change Program To Use An Earlier Version Of Net Framework?

Feb 3, 2010

I wrote a programme and sent it to my client, (it was not a deployment or install file - just the .exe). He responded that it would not run and the PC reported "this program requires Net Framework 2.0". He cannot update the PC in question with Net Framework 2.0. So my question is can i somehow change my program to use an earlier version of Net Framework?

View 11 Replies

Deployment Results In Earlier Version Of Project?

Jan 11, 2010

I am using VB.NET 2008 Express Edition and INNO Setup. When I create a setup and run it, the resulting install is an older version of my project from, I think, 2 or 3 days ago. If I go back to my project in the developer window and run the project, it is clearly a newer version than the install. Since this installed version that comes up was done I have added a form and made many other changes.Is it because the build didn't exeucte? When you run the project doesn't it execute a build every time?I tried this again from a backup. (The backup is much more recent than the version I'm getting.) And it still does the same thing.Why does the install not match the project? It is not possible to go into the project and add the changes because they are already there.

View 3 Replies

Porting VB Projects To Earlier Windows Versions?

Jan 12, 2012

I make loads of programs in visual basic, but it happens that my friends that want to try some, have Windows XP or Vista, when I have Windows 7 on the computer where i create them.I tried to launch the application compiled on 7 on their PCs but it just doesn't work. Is there any way to port programs from Windows 7 to other version of Windows? Or just to find a way to make them run?

View 9 Replies

VB 6.3 Vs 2010 Code Worked In Earlier Version?

Dec 21, 2009

This worked fine in VB 6...but does not in 2010. Any ideas of what I have to change?

If Gun1Avail = "No" Then
targetcount = 1
Do Until targetcount = 7
If frm.Controls("Target" & targetcount & "Gun1") = "Blah" Then
frm.Controls("Target" & targetcount & "Gun1").BackColor = vbRed
End If

[Code]...

View 5 Replies

Denied Access To A Folder Which Earlier Code Created?

Apr 28, 2009

Why am I denied access to a folder which earlier code created? When I run this code an error is issues stating I am denied access to infopath is generated.

[Code]...

View 1 Replies

Client-Server-Client Multithreading - Instant Message Another Client

Jun 21, 2010

We are creating a Who wants to be a millionaire style game in VB. Our server is pulling information such as questions and answers from a Access Database and sending them to the contestants (Clients). All transfer of information is directly from the server to each client. One of the "Life Lines" we want to use is "Ask a friend", where one client is able to Instant message another client for a short time to get help on the question.

[Code]...

View 2 Replies

What Is Ado.net Synchronization Services And How To Use These Services

Mar 14, 2009

What is ado.net synchronization services and how to use these services

View 1 Replies

Making Moving Percentages Into A Moving Graph?

Oct 5, 2008

I have this:

Private m_PerformanceCounter As New _
System.Diagnostics.PerformanceCounter( _
"Processor", "% Processor Time", "_Total")

[code]......

View 4 Replies

Stepping Through All IE Entities?

Dec 21, 2011

I am quite new to VB and have a Problem. I need to step through all IE entities and extract the html source of a tab where some conditions are met.

Private Sub TabPage1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabValues.Click, TabPage1.Enter, TabPage2.Enter
Dim err = "", status As String = ""

[code].....

View 1 Replies

Entities And Multiple Databases?

Sep 26, 2010

We've got the following scenario:

Central Database (replicated across multiple servers)
Client Database 1
Client Database 2

The Central db has Users and Roles amongst other things The Client dbs have similar tables to each other but with some fields tweaked - contact, address, At present, each client db has its own user/role information which is copied from the central db by a scheduled process. I want to retrieve the user/role information directly from the central db instead (bearing in mind tables in the client db make reference to the user entity)

View 1 Replies

Inner Join In Linq To Entities?

Apr 23, 2009

Given two tables, customer and orders, how would one do a linq query to entities to find any customers with open invoices started before a certain date?

View 1 Replies

Link Up Different Entities On Submit Changes?

Nov 15, 2011

I am just digging into L2Sql and I am a little confused on what to do about inserting several records into my database that are related.

For example:

I have an entity mapped to a user table called user. This class contains UserId and Username.

I have an entity mapped to a preference table called preference. This class contains PrefId, PrefName, UserId.

I have an entity mapped to a profile table called profile. This class contains ProId, ProName, UserId.

When I ask a user to register for an account, this will populate a User object. I will then create two "blank" objects to relate to this user, a profile and a preference.

I notice that the dbml has a User property on both the profile and prefernce entities. Am I right in thinking that if I pass the User object to this property, this in turn sets the UserId for these objects?

If thats the case, when do I actually do this? Surely I would need to InsertOnSubmit the user object, query it back to get the Id and then pass this User object to the others before Inserting them?

At the moment I have this,

Dim reg As New User
reg.Username = username
Dim pro As New Profile

[Code]....

View 5 Replies

XML Resolves Entities On Save?

Aug 9, 2010

I have a simple XML file like so:

<?xml version="1.0" encoding="UTF-8"?>
<foo attr="blah &#176; blah"/>

When I load it into the .NET XmlDocument and issue a Save, i.e.:

xmlDoc = New XmlDocument()
xmlDoc.Load("c: empar.xml")
xmlDoc.Save("c: empad.xml")

the new XML file contains the resolved amp 176 (a degree sign). This then breaks the final black box I'm trying to load the XML into. I've tried playing with the encoding, to little effect. Is it possible for the parser to just echo what came in, without resolving the entities? Inerestingly, it doesn't resolve &amp;#176;

View 1 Replies

Writing A Program With 1 Client And Server Where Client Side Creates A Text File

Dec 1, 2008

I have been reading through Atheists posts in regards to client-server and TCP client/server connection's. But how do i go about writing a program with 1 client and server where the client side creates a text file.Once the server sees there is a text file it connects and downloads it to itself or the client pushes the text file to the server.Once on the server i will read the text file and put its info into a sql db.

View 14 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved