|
Steve,
Don't know if these recommendations are of use but I really liked Mastering Visual Basic .NET by Evangelos Petroutsos ISBN 0-7821-2877-7. Maybe this same author has a newer book which covers your needs. Also, when I wrote code in asp.net for 2005, I wish I had a book with the treeview class. You might be able to date a book on asp.net if it has a section on that book. The asp.net book I have is Mastering asp.net with vb.net by A. Russell Jones ISBN 0-7821-2875-0. Again, maybe this book/author has a later version to help your needs. Both books have screens shots, good code examples, and what I thought were good technical explanations.
Hope this helps
tanya
|
|
|
|
|
Thanks Tanya.
I'll keep those authors in mind.
I have sourced quite a few Microsoft books on the subject but I am loathed to try them from my past experience with Microsoft teaching materials.
Thanks for your input.
Steve
|
|
|
|
|
|
Great! many thanks Kevin.
Steve
|
|
|
|
|
Hi,
I need move data from a access database to a sql 2005 database, using ado.net and VB.net
Basically, the user will select which access database to move to sql 2005, choosing from a select box on a webpage. I use an FileUpload tag to let the user select the access database(MDB file), to convert to sql 2005 database.
At the moment I can get all the data from the access database into a dataset using OleDbConnection. I just dont know how to move this information in the dataset to the sql database, in one function.
Does anyone know if there is code out there that does this, of know where I can find info on this?
Really appreciate the help.
Thanks
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
Does the DB already exist in SQL Server?
If so, read your data into an ADO.NET DataSet and then write it to your SQL database.
If not, you will need to do the same as above but also use some TRANSACT SQL to build your database and tables in SQL Server.
I don't know of any publicly available (free) code that will do this for you. You will have to create it yourself. However, you may be able to purchase a pre-written utility that does this for you, don't know of one though...
Steve
|
|
|
|
|
Thanks Steve,
Yes, the database is already in sql, just need to get the info from mdb, and export to sql.
I used the dataset method, and it seems to work very nicely. Just need to run a few tests and do some validation now.
Regards
Playout
|
|
|
|
|
Hey all,
Is there a way to upload an xml document to a script that can then use it as xml and parse it.
I created a php script that will take an xml file off the server, and parse it the way I want, however I do not want to write the file to the server first, I want it to just take the uploaded xml document and begin parsing it.
here's the current uploader that i was using for just string data:
visual basic code:--------------------------------------------------------------------------------
Public Function PostToWebUpdate(ByVal postData) As Boolean
Dim Client As WebClient
Try
Dim dataBytes As Byte() = Encoding.ASCII.GetBytes(postData)
Client = New WebClient
Client.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
Dim returnedBytes As Byte() = Client.UploadData("http://www.1483online.com/sciptThatIwant", dataBytes)
Dim myResponse As String = New String(Encoding.ASCII.GetChars(returnedBytes))
Return myResponse = "SAVED"
Catch ex As Exception
MessageBox.Show("Error: PostToWeb: " & ex.Message)
Return False
Finally
Client.Dispose()
Client = Nothing
End Try
End Function--------------------------------------------------------------------------------
However, would this be a parsable xml file or some other thing that I have to convert to xml?
I'm thinking that I cannot use the above post code. I used to have to write a string like this:
game=12&turn=18&unit=Infantry........
Then, I pulled in the variables using php's $HTTP_POST_VARS['game'] (which would return 12). However, I do not know what the $HTTP_POST_VARS['thisvariablename'] would be. Any ideas?
Thanks,
Mike
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
As the data that you post doesn't follow the format that you specified (urlencoded), you can not read the request using $HTTP_POST_VARS['anything'].
You have to read the entire request stream as binary data. In ASP and ASP.NET this is done using the BinaryRead method, but how that is done in PHP I have no idea.
---
b { font-weight: normal; }
|
|
|
|
|
is there a way to alter the format to make it readable by grabbing the post data? (what would that be ;-D)
Thanks
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
Then you would put the xml document as a posted value by url encoding it, so that the data that you post looks something like this:
doc=%3C%3Fxml+version%3D%221.0%22%3F%3E%0D%0A%3C...
---
b { font-weight: normal; }
|
|
|
|
|
could you please give an example, I'm not following very well. :-/ The only thing that I saw for urlencoding was in an httputility but I couldn't use it for some reason (maybe referencing).
If I have this (a very basic xml file):
Dim XMLDoc As New XmlDocument
Dim xNodeList As XmlNodeList
Dim xNode As XmlNode
XMLDoc.LoadXml("<units>")
Dim info As XmlElement = XMLDoc.CreateElement("info")
info.SetAttribute("attacker", "greek")
XMLDoc.DocumentElement.AppendChild(info)
What do I do to the newly created XmlDocument to get it posted and encoded correctly?
Also, what is the referencing post name?
Thanks,
Mike
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
Get the xml document as a string, and use HttpUtility.UrlEncode on it. Use the string as a value in the post data, e.g. "doc=" + xml .
---
b { font-weight: normal; }
|
|
|
|
|
hi all..
i have a problem.. how can i send several data in one time using mscomm1..
can someone please help me..
thanks..
areon25
|
|
|
|
|
Send several data? You can only send one piece of information at a time. You'll have to explain what you mean by "send several data in one time".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi all..
thanks dave.. ok.. i'll explain what i whant to do..
actually, i want to make a project using vb. i want to make some interface in vb to my hardware using MSCOMM.. actually, about the hardware, i want to control motor.. but for this moment i want to learn simple application, for example i want to turn on LED( the hardware ) from the interface(VB).
for your information.. i use PIC16F877A and microC software(from microelektronika) to program the PIC16F877A.. and i use rs232 protocol
for this moment i want to send data from vb using MSCOMM to turn on the LED..
for example, in my vb there are two command button, button1 and button2.. button1 is for turn on the LED1 and button2 is to turn on the LED2..
does someone know how to do it.. can someone please help me..
areon25
|
|
|
|
|
First, which version of VB are you using?? VB6, VB.NET 2002, 2003, or 2005?
Now, those are two entirely seperate projects that don't have anything to do with each other...
The first one, programming a controller over serial, is easy enough to do. All you have to do is setup the COMM port with the correct parameters and start sending and receiving data, just like you type it in HyperTerminal. The exact procedure for which is dependant on your controller requirements. You can find example projects all over the 'Net, just Google for "VB Serial Comm".
The LED one isn't so easy. The serial port isn't normally used for this because of its low pin count and the programmability of the port only gives you a brief "ON" for the LED, unless you continuously send data to the port. The parallel port is customarilly used for LEDs, switches, and stepper motors. Again, just Google for "VB control LED" and you'll find a few projects, but on the parallel port.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi all..
thanks dave for replying my msg..
for your in formation i use vb 6.0..
areon25
|
|
|
|
|
Hello, I'm sorry for asking such a basic question but I cannot find the answer to it by searching any forums..
All I need is to be able to do something simple like make a msbgox pop up when the user clicks enter on a text box. Basically a user will type a number in the textbox and then a pop up box will appear showing the number they have just typed.
Could someone help me with this please?
Thanks
John C
|
|
|
|
|
There are several possible ways to do this, depending on your needs. You could use the "Leave" event of the textbox to popup your messagebox when the control loses focus (either by pressing enter, tab, or clicking the mouse on another control).
If you only want the popup to occur when the enter key is pressed, you should use the textbox control's "Keypress" event to check whether the key pressed was the return key, and run your popup code if it was.
Hope this helps.
|
|
|
|
|
Hi,
I think the following code will fulfill your requirement.
TextBox1_KeyPress
-----------------
If Asc(e.KeyChar) = 13 Then
MsgBox("The Data You Have Entered : " & TextBox1.Text, MsgBoxStyle.Information)
End If
With Regards,
Pandian S
|
|
|
|
|
iam working in vb.net 2003 the default datetime format is 'mdy' when i try to store datetime in database in format 'dmy' error apear i want to store datetime n database in format 'dmy' and when reterive and dir in application dir it in format 'dmy'
ma_refay
|
|
|
|
|
That is impossible. You can not store a date in a specific format, as a date field doesn't have a format.
Specify the format to use when you convert the date into a string for displaying.
Example for ISO 8601 standard format:
lblDate.Text = reader.GetDateTime("mydate").ToString("yyyy-MM-dd")
---
b { font-weight: normal; }
|
|
|
|
|
If you use myTextBox.Text.ToLongDateString() the return value will always be in the format of the current culture of the machine (regional settings) or that has been set in your app.
Other methods are:
.ToShortDateString()
.ToLongTimeString()
.ToShortTimeString()
etc...
Steve
|
|
|
|