|
See Graus' response.
Blog link to be reinstated at a later date.
|
|
|
|
|
declaring a new IP address
Dim add As IPAddress(New Address As Long)
the long value of IP Address? how to find that?
it says like a value 0x3l3443 in big endian format...
how to convert IP to big endian or Long?
|
|
|
|
|
Just use shift operators to move your 4 bytes into the right locations of your single digit.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
didn't get that honestly!
say i ve an IP 123.212.4.3
hot to find its long or big endian form?
|
|
|
|
|
In C#, you'd do do 123 << 8 to move the byte across by 8 bits. I don't know how to do that in VB, but that's the general idea. You could just multiple by 2 to the power of 8, 2 to the power of 16 and 2 to the power of 24, if you can't find the shift operator.
Oops - this is the C# forum.
123 << 24 + 212 << 16 + 4 << 8 + 3 would move them so they were in order, left to right. I'm sure that's not big endian, so get the order of digits right and that should work.
http://www.codeproject.com/KB/cs/leftrightshift.aspx[^] explains how it all works. There's at least one other article that has a helper class you may want to check out.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Are the IPAddress.NetworkToHostOrder and IPAddress.HostToNetworkOrder methods of any use to you?
Alan.
|
|
|
|
|
i am currently using vs 2005 to send mass sms, such that the request goes to SQL server 2005 and then to ozeki sms server.
it was working perfectly fine and it just suddenly stop working.
these are (part of) my codes:
Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click
Call SelectAllUsers()
End Sub
Protected Sub SelectAllUsers() 'Method to select all users data to send
Dim connStr As String = ConfigurationManager.ConnectionStrings("SMSConnectionString2").ConnectionString
Dim conn As New SqlConnection(connStr)
conn.Open()
Dim ds As DataSet
Dim mySQL As String = "Select phone_number from users where category = 'A'"
Dim da As SqlDataAdapter
da = New SqlDataAdapter(mySQL, conn)
ds = New DataSet()
da.Fill(ds, "phone_number")
Dim tblNumbers As DataTable
tblNumbers = ds.Tables("phone_number")
Dim drNum As DataRow
For Each drNum In tblNumbers.Rows
InsertSMSRecord(drNum("phone_number").ToString)
Next
Me.textboxError.Visible = True
Me.textboxError.Text = "Message has been sent to all users in Category A."
...
Protected Sub InsertSMSRecord(ByVal recepientNumber As String) 'Inserting Record to Database, To trigger
Dim connStr As String = ConfigurationManager.ConnectionStrings("SMSConnectionString2").ConnectionString
Dim conn As New SqlConnection(connStr)
Dim mySQL As String = "Insert Into ozekimessageout (receiver,msg,timetosend,status,sender,category) values (@receiver,@msg,@timetosend,@status,@sender,@category)"
Dim SqlInsert As SqlCommand = New SqlCommand(mySQL, conn)
SqlInsert.Parameters.AddWithValue("@receiver", recepientNumber)
SqlInsert.Parameters.AddWithValue("@msg", Me.txtMsg.Text)
SqlInsert.Parameters.AddWithValue("@timetosend", Me.showTime.Text)
SqlInsert.Parameters.AddWithValue("@status", "send")
SqlInsert.Parameters.AddWithValue("@sender", Me.lblShowUser.Text)
SqlInsert.Parameters.AddWithValue("@category", Me.dd_category.SelectedValue)
conn.Open()
SqlInsert.ExecuteNonQuery()
conn.Close()
End Sub
nth get sent to the database and when i manually add something into the database, my server doesn't respond as well.
help
|
|
|
|
|
so, which line is failing ?
peanutong wrote: when i manually add something into the database, my server doesn't respond as well
Sounds like the server is dead, no ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
my server is a sms server. now it can send single smses. but cant send multiple smses at one go, as in mass send? can u see any problem with my sql statement?
as my server is able to send single sms, so its not dead. i just don't know why i was able to mass send smses a few days ago. today it just suddenly died.
modified on Thursday, August 21, 2008 6:49 AM
|
|
|
|
|
No, it's pretty vanilla SQL. I guess the issue is the limitations of the server.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
if dats the case, why i could mass send a few days ago?
|
|
|
|
|
What the hell is 'dats' ? You're not SMSing now, speak english.
I have no idea, you're the one with the funky SMS server. Seems to me like you have an issue with a server that you've not named, and so even if someone was using it, we wouldn't know to help you. Don't the people who provide the server offer support ? We're happy to help, but we need to have experience with the product you're using, so if it's not core language stuff, asking the vendor or their help boards is often faster.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
i'm using ozeki sms server. i've emailed them, it's been 2 days and there's no reply. thanks.
|
|
|
|
|
OK, if you make that more prominent by editing your original post, you may get lucky, someone who has used it may read it. I'd even put it in the header, actually, to help attract the rare people who can help.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I'm doing a masterdetail form, so far when you typed the data in the detailed form and datagridview, it works, but the moment you save it and load it again nothing appears in the datagridview, but the one in the detailed form works properly
here is the code I used:
Private Sub FrmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.OrderIDTableAdapter.Fill(Me.Database1DataSet.OrderID)
Me.ProductsTableAdapter.Fill(Me.Database1DataSet.Products)
End Sub
Private Sub ProductsBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProductsBindingNavigatorSaveItem.Click
If Validate() Then
ProductsBindingSource.EndEdit()
OrderIDBindingSource.EndEdit()
Try
Me.OrderIDTableAdapter.Update(Me.Database1DataSet.OrderID.Select("", "", DataViewRowState.Deleted))
ProductsTableAdapter.Update(Me.Database1DataSet.Products.Select("", "", DataViewRowState.Added Or _
DataViewRowState.ModifiedCurrent Or DataViewRowState.Deleted))
Me.OrderIDTableAdapter.Update(Me.Database1DataSet.Products.Select("", "", DataViewRowState.Added Or _
DataViewRowState.ModifiedCurrent Or DataViewRowState.Deleted))
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End If
End Sub
|
|
|
|
|
is this possible in visual basic.net?
cant seem to make it work
vb.net
using access database
oledb
update t1
set t1.f1 = (select sum(t2.f1)
from t2
where t1.code=t2.code)
ty in adv
|
|
|
|
|
You're posting SQL. Does the SQL work in Access ? If not, that is your issue. if so, then your issue is with the code you're not posting, the code that is appropriate for this forum. You know, in VB.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
In MSSQL, the syntax would be
UPDATE t1
SET f1 = SUM(t2.f1)
FROM t1
INNER JOIN t2
ON t1.code = t2.code
I assume it would be the same in Access. The key here is that the column receiving the update is not aliased, and any tables used in the update need to have their own references in the FROM statement.
Don't use old style SQL Join syntax (from t1, t2 where t1.code=t2.code) if you can help it. Its difficult to follow.
|
|
|
|
|
ty for the reply
but i get this error
Syntax error (missing operator) in query expression 'SUM(Accessory_Table.Qty * Accessory_Table.Cost) FROM Stock_Table INNER JOIN Accessory_Table ON Stock_Table.StkCode = Accessory_Table.StkCode'.
this is my actual code
"UPDATE Stock_Table " & _
"SET StkCost = SUM(Accessory_Table.Qty * Accessory_Table.Cost) " & _
"FROM Stock_Table " & _
"INNER JOIN Accessory_Table " & _
"ON Stock_Table.StkCode = Accessory_Table.StkCode"
maybe UPDATE and SUM doesnt really work together in access?
|
|
|
|
|
How to extract or get source code from a dll in VB
|
|
|
|
|
Do you own the DLL?
I suspect not - why would you make such a request to software developers, you know the people who create the DLLs you want to get the source from. If you do own the DLL then you already have the source and why are you asking. If you have lost the source then you a sh*t out of luck.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: If you have lost the source then you a sh*t out of luck.
Well put
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
One gets the impression that even if you got it, you'd have no idea what to do with it. Why do you want to get source from someone elses dll ? VB.NET or VB6 ? Do you have any idea about the .NET framework at all ? Why did you post this in two forums ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Christian Graus wrote: Why did you post this in two forums
Perhaps the clue train passed his station without stopping.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hi,
i need to getting list of visited sites in Vb.Net.
please help.
Thanks
modified on Thursday, August 21, 2008 5:06 AM
|
|
|
|