ericstenson 5 Posting Whiz in Training Team Colleague

Also, meant to add, when tested against a simulator, it works...

ericstenson 5 Posting Whiz in Training Team Colleague

Hi, I am receiving a stream of data (a text message) through a TCP listener. It then sends back a stream. Then the first computer (the client) sends another stream of data. Then I send back a response message.

The first message is successfully received.
The first response is successfully sent.

Then it stops working. If I close the connection and re-open the connection, it works. Any ideas? The connection is staying open...

Dim BYTES(4096) As Byte
        Dim DATA_RECEIVED As String = Nothing
        Dim HL7_STRING_RECEIVED As String
        Dim SERVER_TCP_LISTENER As New TcpListener(6300)
        SERVER_TCP_LISTENER.Start()
        Dim HOSPITAL_HL7_CLIENT As TcpClient = SERVER_TCP_LISTENER.AcceptTcpClient()
        DATA_RECEIVED = Nothing
        Dim NETWORK_DATA_SREAM As NetworkStream = HOSPITAL_HL7_CLIENT.GetStream()

            Do While True

                If NETWORK_DATA_SREAM.CanRead Then
                    Dim TCP_READ_BUFFER(HOSPITAL_HL7_CLIENT.ReceiveBufferSize) As Byte
                    Dim HL7_MESSAGE_BUILDER As StringBuilder = New StringBuilder()
                    Dim NETWORK_BYTES_READ As Integer = 0
                    Do
                        NETWORK_BYTES_READ = NETWORK_DATA_SREAM.Read(TCP_READ_BUFFER, 0, TCP_READ_BUFFER.Length)
                        HL7_MESSAGE_BUILDER.AppendFormat("{0}", Encoding.ASCII.GetString(TCP_READ_BUFFER, 0, NETWORK_BYTES_READ))
                    Loop While NETWORK_DATA_SREAM.DataAvailable
                    HL7_STRING_RECEIVED = HL7_MESSAGE_BUILDER.ToString

                    If Len(HL7_STRING_RECEIVED) > 10 Then

                        Dim HL7 As New HL7_IBOUND_MESSAGE
                        Dim RESPONSE_MESSAGE As String = ""
                        RESPONSE_MESSAGE = HL7.PROCESS_INBOUND_MESSAGE(HL7_STRING_RECEIVED)
                        ' HL7_STRING_RECEIVED = HL7.ADT_MESSAGE.ACCEPT_ACKNOWLEDGEMENT.GENERATE_MESSAGE
                        Dim ACK_MESSAGE_BYTES As Byte() = System.Text.Encoding.ASCII.GetBytes(RESPONSE_MESSAGE)
                        NETWORK_DATA_SREAM.Write(ACK_MESSAGE_BYTES, 0, ACK_MESSAGE_BYTES.Length)
                        ACK_MESSAGE_BYTES = New Byte(256) {}
                        HL7_STRING_RECEIVED = ""


                    End If

                    If NETWORK_BYTES_READ = 0 Then
                        HOSPITAL_HL7_CLIENT.Close()
                        SERVER_TCP_LISTENER.Stop()
                        HL7_NETWORK_INTERFACE()
                    End If




                End If
            
            Loop
ericstenson 5 Posting Whiz in Training Team Colleague

Spicelogic has a component that you can drag-n-drop. I have used it, it's cheap and quite an efficient way to integrate PayPal into .NET apps.

ericstenson 5 Posting Whiz in Training Team Colleague

Why can't you run a SQL UPDATE statement...

UPDATE TABLE_NAME SET INT_COLUMN = (INT_COLUMN - 1) WHERE INT_COLUMN > @DEL_ROW_VALUE

Would something like that work?

ericstenson 5 Posting Whiz in Training Team Colleague

Dear Friends,
i host a website and use visual web developer for aspx ...
i want to create a form , in which users will aftre logging to my page enter 10-12 fields and that will be appended in a backend database on my server eg MS Access... please suggest..

Hire a web developer.

ericstenson 5 Posting Whiz in Training Team Colleague

I am not sure how to answer the question other than:

"ARE YOU SERIOUS?"

We would all be in a lot of trouble if IIS was not able to handle 2 users at the same time and keep them seperate.

ericstenson 5 Posting Whiz in Training Team Colleague

www.14dayz.com seems pretty good. I used to use that when I worked for a web dev company in Boston. I think it was written for attorneys or something, but it scales REALLY nicely to software development.

ericstenson 5 Posting Whiz in Training Team Colleague

Itext (itextsharp) is free.

ericstenson 5 Posting Whiz in Training Team Colleague

Using your example above, the following reservation has been made:

A: 4/17/2009
D: 4/25/2009.

Now, a customer calls and says I want to book 04/16/09 to 04/27/09.

Let's go through my steps.

1. Do any arrivals fall within the date range?
Arrival of 4/17/2009 falls between 4/16 and 4/27 -- record is returned

2. If there is a record returned, you cannot book.
We cannot book this the 2nd reservation.

****

Let's modify the example, and say your 2nd resevation was 4/18/09 to 4/27/09.

1. Do any arrivals fall within the range?
Previous booking has arrival of 4/17, so NO.

2. If so, you cannot continue.
We can continue, because the answer was NO.

3. Are any departures within the date range of 4/18/09 to 4/27/09?
Yes, the first booking is leaving 04/25/09.

4. If so, you cannot continue.
We cannot make the reservation, because a deperature falls within the range.


Does this make sense??

BluePaper commented: Thank you for helping me get my head around this! +1
ericstenson 5 Posting Whiz in Training Team Colleague

In my example above BookDate means Arrival Date, sorry on the confusion

ericstenson 5 Posting Whiz in Training Team Colleague

What you need to do is the following:

1. Run a query to see if any bookings fall within your date range.
(Select * from Bookings where BookDate >= YourStartDate or BookDate <=YourEndDate

2. If there is a record returned, you cannot book.

3. Next, check to see if there is a departing record
(Select * from Bookings where Departdate > YourStartDate AND DepartDate =<YourEndDate

4. If a record is returned, someone is departing durign that time. You cannot book.

Make sense?

ericstenson 5 Posting Whiz in Training Team Colleague

On quote from Microsoft: "All the server page life-cycle events occur, and view state and form data are preserved. However, in the rendering phase, only the contents of the UpdatePanel control are sent to the browser. The rest of the page remains unchanged."

So, yes. It's a bad question, though, because it isn't quite so black & white.

ericstenson 5 Posting Whiz in Training Team Colleague

Do you have an SMTP server on that machine? Could there be a firewall issue?

ericstenson 5 Posting Whiz in Training Team Colleague

What happens on port 25?

ericstenson 5 Posting Whiz in Training Team Colleague

No, the page is not always refreshing. The only time you get the page refreshing is when the pop-up appears.

ericstenson 5 Posting Whiz in Training Team Colleague

Ah, it looks like you are running MySQL. This might be helpful:

http://209.85.215.104/search?q=cache:GDfHUg7ZQNwJ:expressionengine.com/forums/viewthread/29132/+ERROR+1264+(22003):&hl=en&ct=clnk&cd=1&gl=us

ericstenson 5 Posting Whiz in Training Team Colleague

You might have to post this in the database forum, but why are you specifying INTEGER(50)? Shouldn't it just be a datatype INTEGER?

I mean, an Integer is a whole number. So "1" is just "1", not 1.0000.... therefore, I don't think INTEGER(50) makes any sense. Moreover, an INTEGER type in SQL server has a range of +/- 2147483647. Again, no size is specified like CHAR(X), VARCHAR(X), etc.

Try it and see if it works! Can't hurt!

ericstenson 5 Posting Whiz in Training Team Colleague

Can you please post the class code?

ericstenson 5 Posting Whiz in Training Team Colleague

Are you using the development server or IIS?

ericstenson 5 Posting Whiz in Training Team Colleague

Try Quickbooks.

ericstenson 5 Posting Whiz in Training Team Colleague

sqlexpress is a named instance of an SQL server.

I would do it in code with the system.net.mail namespace...

Dim User_Password as String

'''''''' FIRST GET THE PASSWORD FROM THE DATABASE

User_Password = YOUR USER'S PASSWORD


    

        Dim ObjectMail As New SmtpClient("MAILSERVER", 25)
        ObjectMail.EnableSsl = False
        ObjectMail.Credentials = New Net.NetworkCredential("USERNAME", "PASSWORD")
        Dim TheMessage As New MailMessage
        TheMessage.From = New MailAddress("NoReply@YOURDOMAIN.COM", "YourDomain.Com")
        TheMessage.To.Add("email@somedomain.com")
        TheMessage.Subject = "Your Password"
 Dim MB As New StringBuilder
        MB.Append("Your password is: " & User_Password)

        TheMessage.Body = MB.ToString
        ObjectMail.Send(TheMessage)
ericstenson 5 Posting Whiz in Training Team Colleague

You are doing it all wrong. How much experience in this do you have?

ericstenson 5 Posting Whiz in Training Team Colleague

or i think you can use .value.tostring

ericstenson 5 Posting Whiz in Training Team Colleague

What I would do is run a timer on the first form that checks a Session object like

If Session("SearchClosed") = 2 then

Timer1.enabled = False
DO WHATEVER YOU WANT BECAUSE IT IS BACK TO THE FIRST FORM

End If

And before you close the search form set Session("SearchClosed") = 2
That way when the timer ticks on the first form, it knows the search window has closed. Fire the timer on the first form every few seconds... and enable the timer on the window pop-up. The "SearchClosed" will start with a value of 1.

ericstenson 5 Posting Whiz in Training Team Colleague

It's doable. Here is how I would attack it....

1. Drop an ASP UpdatePanel somewhere on the page
2. Create a Session variable called "PopupEvent" (Session.Add("PopUpEvent", "1")
> Set this to a value of 1
3. Put a timer in the UpdatePanel. Let it fire every 2-5 minutes
4. When the timer fires, let it check to see if there is any event in your database that is within the next (X) number of minutes.
5. If there is an event, set the Session("PupUpEvent") = "2"
5a. Create a session object to handle the Event ID / Record ID in your database of the event
6. If there is an event, enable a second timer outside of the UpdatePanel.
7. Turn off the first timer
6. When the 2nd timer is fired, turn it off, and reload the page
8. On the PageLoad call create an if statement:

If Session("PopUpEvent") = 2 then

Response.Write("<script>")

                Response.Write("window.open('WHATEVERNEWPAGENAME.aspx','_blank','toolbar=0,location=0,menubar=0,resizable=0,width=400,height=320')")

                Response.Write("</script>")
    Response.Write("<script>")

                Response.Write("window.open('YOURREMINDERPAGE.aspx','_blank','toolbar=0,location=0,menubar=0,resizable=0,width=400,height=320')")

                Response.Write("</script>")



end if

On loading 'YOURREMINDERPAGE grab out of session the record from the database of the even that is pending.

ericstenson 5 Posting Whiz in Training Team Colleague

Too many possibilities. Firewall issue? Are you just trying to use the development server? Because the development server that runs when you test doesn't support remote connections. Did you configure IIS to run a web application? Did you actually create a virtual directory in IIS for the application?

ericstenson 5 Posting Whiz in Training Team Colleague
Dim conn1 as new data.sqlclient.sqlconnection(CONNECTIONSTRING)
Dim Select_String as String = WHAT YOU JUST WROTE
Dim Select_Adapter as new data.sqlclient.sqldataadapter(Select_String,conn1)
Dim YourDataSet as New Data.Dataset
conn1.open
Select_Adapter.Fill(YourDataSet)
conn1.close

There are free converters to C# if you need.

ericstenson 5 Posting Whiz in Training Team Colleague
Response.Write("<script>")

                Response.Write("window.open('WHATEVERNEWPAGENAME.aspx','_blank','toolbar=0,location=0,menubar=0,resizable=0,width=400,height=320')")

                Response.Write("</script>")

The Pop-Up is just a different page; Play around with the height and width. You would do that action on a "Button Click" or pageload or whatever event...

ericstenson 5 Posting Whiz in Training Team Colleague

What an insanely hypocritical post. You say this thread shouldn't be here, but you actually contribute to the thread! If you think it is "unrelated" to DW, then why would you read it, much less reply to it?

That's the great thing... no one forces anyone to participate. So those that wouldn't care to be part of it, simply wouldn't visit the section. For instance, I don't code in PHP, so I never visit the PHP section -- just not relevant or appealing to me.

You guys are way too quick to criticize. You should try being more supportive.

ericstenson 5 Posting Whiz in Training Team Colleague

No, dating in the lounge. Not a whole new forum. More like a thread.

ericstenson 5 Posting Whiz in Training Team Colleague

There are a few methods by which this can be down. You can control a web broswer control if you are using a windows based application. If it's a web app, it's a little more difficult, but you can create a http request and read the stream back.

The examples of how to do this are quite long. Use google a little to get it going, then when you get stuck, I'll help you out.

ericstenson 5 Posting Whiz in Training Team Colleague

You need to check the firewall settings. Where is the mail server? Can you authenticate? Does it allow relaying?

ericstenson 5 Posting Whiz in Training Team Colleague

Eventually I will sell you guys on it... :)

ericstenson 5 Posting Whiz in Training Team Colleague

Come on, don't remove my thread. This is a good idea.

ericstenson 5 Posting Whiz in Training Team Colleague

Starbucks is a coffee house, not a dating service, so if people meet at starbucks, should it just close down and people stop going there? Universities are for education, so if people meet in class should the school just shut down and people stop learning???? Love can be found in many areas of life, and it generally happens where people have a common interest... right?

Come on, Ancient... it's not even correct what you say: "DaniWeb is devoted to IT" ... I read receipies (Dani's cookbook) and all sorts of stuff unrelated to I/T on DW. Plus, it's a total manipulation of my post to say "DaniWeb if it were turned into some sort of dating service" ... as if the site would not be I/T anymore... what I said was it should simply have a forum for people to meet. If two DW memebers get together for coffee, that should be cool.

ericstenson 5 Posting Whiz in Training Team Colleague

I can only say one thing::::::: are you kidding me?

ericstenson 5 Posting Whiz in Training Team Colleague

Sure. You will need to create an SQL database and table with the product information. You will need to create a user account (most likely) within SQL to allow your program to access the database.

you will then need to connect to the database. let the wizard create the connection string for you.

when the user enters the item id, you will then need to retrieve the item price and description. you can do this through something like

dim conn1 as new data.sqlclient.sqlconnection(sqldatasource1.connectionstring)
dim SQL_SELECT_P as string = "Select ItemPrice from Items where ItemID = '" & itemid.text & "'"
dim SQL_SELECT_D as string = "Select ItemDesc from Items wher ItemID = '"& itemid.text & "'"
dim SQL_Command_P as new data.sqlclient.sqlcommand(Sql_Select_P,conn1)
dim SQL_Command_D as new data.sqlclient.sqlcommand(Sql_Select_D,conn1)
conn1.open
ItemDescription.Text = sql_Command_D.executescaler
ItemPrice.Text = sql_Command_P.executescaler
conn1.close

There are obviously better ways to do it and stuff and it will be slightly more complicated in the end, but that should get you going.

ericstenson 5 Posting Whiz in Training Team Colleague

? Who said anything about porno ?

I am talking social lounge... a place to meet.

ericstenson 5 Posting Whiz in Training Team Colleague

In fact, under coffee house, I think we should have a "Singles Scene"

ericstenson 5 Posting Whiz in Training Team Colleague

Well, enough with match.com, jdate, eharmony (e-her-money), and the other so-called dating sites... who needs those with Daniweb.com? With over 200,000 active users, people *** should *** be able to make a connection here.

So, I start this thread as a dating thread. Post your personal, get a reply... maybe.

ericstenson 5 Posting Whiz in Training Team Colleague

He is saying that you need to add the web browser control to the form...

ericstenson 5 Posting Whiz in Training Team Colleague

If your application is already running and working for your client, I would be weary about making major changes to the application. What I would do if I were you is when the program launches, I would have it download a new text file from a predefined path on the internet... that way, the changes can be distributed just by people opening and closing the application.

ericstenson 5 Posting Whiz in Training Team Colleague

The issue is because a normal ASP.NET page executes server side. Timers are run client side. You can use a timer on a webpage, but you need to use AJAX.

Go to www.asp.net and download the AJAX extension for VS 2005. You will then see the timer control.

Best/Eric

ericstenson 5 Posting Whiz in Training Team Colleague

It's more complicated that you would think, but it isn't obscenely complicated. You can control the web browser by code. It will also require you to use a timer (at least I would be using a timer to look at the browser at specific intervals and to progress it through the various steps).

You need to start the project and ask a specific question, though, generally speaking DW users don't provide whole projects...

ericstenson 5 Posting Whiz in Training Team Colleague

Put it in a table, leave a column to the left, give the column some width.

ericstenson 5 Posting Whiz in Training Team Colleague

Like, as in, Session.Add("WhatToSay","Hello")

Label1.text = Session("WhatToSay")

Something stupid like that?

ericstenson 5 Posting Whiz in Training Team Colleague

Are you trying to interface with existing carriers or are you looking to reserve your own planes?

ericstenson 5 Posting Whiz in Training Team Colleague

Hi Catherine - I see you are relatively new at posting to daniweb, so I want to offer some advice. Because, while I appreciate there is a legitimate question you want answered, the way you presented your question needs some improvement.

I think I can speak for most of the community when I say we are more than happy to give advice. But we need to understand what you need, and we need it in a very straightforward manner, because we don’t get paid for this and we don’t want to figure out what you are asking or read a whole bunch of unnecessary code. We need to see the code that is relevant to your error or problem along with a clear and concise question.

In this case, you presented the code for your entire application -- which I understand works. You then proceeded to paste the entire homework assignment. This, too, I (and likely others) read... only to find it irrelevant to your very end question:

"I really need help with saving peoples scores in a text file and displaying them when the button is press "save scores"

Luckily you precede that closer with "I dont want it all done for me as I'm slowly working on it but can someone point me in the direction."

So I am going to point you in the right direction. Search daniweb for Reading/Writing to a text file. You will find plenty of code examples.

ericstenson 5 Posting Whiz in Training Team Colleague

You could make each case it's own function

Case mac(0)

    RT_Mac_0

Case mac(1)

    RT_Mac_1

End Sub..


Public Sub RT_Mac_0

   Do whatever you want

End Sub

Public Sub RT_Mac_1

   Do whatever you want

End Sub

Make sense?

ericstenson 5 Posting Whiz in Training Team Colleague

Are you just looking for the sum of the comulms?

Because you can write a SUM(XXXX) query and just let SQL return you the results. You could also write a SELECT MPT FROM DDDD WHERE MPT > 29...