|
I have written some subs where you pass in the dropdown, the dataset, the table name and the columns. Then you can re-use the sub for loading any dropdown.
Ben
|
|
|
|
|
Thanks for that idea and including what is needed to be passed.
Dan
|
|
|
|
|
I need to build a desktop vb.net application that requires database connectivity. I used to write applications that connects to sql servers installed on separate machines. In this application i need to make the whole application mobile (the application and the database).. How can I do that?
Can the database be included in a setup file with the application its self?
Akram..
|
|
|
|
|
You might want to look at using sql express. It is a local sql server engine that is free. You could add it to your install and everything would be local.
Hope that helps.
Ben
|
|
|
|
|
You can use either SQL Express or Access as the database. You do NOT need Access installed to use the database. Just the MDAC components need to be installed.
|
|
|
|
|
Hallo
I am dealing with a problem in my project. I am using Visual Basic 2005. I am able to create a .txt file in my PDA but i don't know how to save it to a network drive. The idea is to press a SAVE button in the form (PDA) and the file to be saved in a network drive (e.g. c:\output.txt). I know how to do it only from a network computer to another, using a mapped network drive. Is there something like <<dim out="" as="" streamwriter="New" streamwriter("\\192.168.0.10\c\output.txt")="">> or <<\\computer_name\c\output.txt>> ????
Any given code sample or link to the necessary reading ( e.g socket? ) would be much appreciated!
Thank you in advance for your time
|
|
|
|
|
k.giannis_1980 wrote: Is there something like <<dim out="" as="" streamwriter="New" streamwriter("\\192.168.0.10\c\output.txt")="">> or <<\\computer_name\c\output.txt>> ????
Yes. What you described are the UNC paths to the server, share name, and file system path to a file. Saving the file is no different than if the path was C:\something. The code is exactly the same, just a different way of describing the filepath.
\\servername\sharename\folder\folder\filename
or
\\ipAddress\sharename\folder\folder\filename
|
|
|
|
|
Thank you so much!
It worked perfectly.
Thank you again for your fast reply
|
|
|
|
|
I have an application that has worked happily for many years under VB2003.
Today I upgraded it to VB2005 with no upgrade issues or changes.
The following line now fails
dim datestr as string = "7thNovember1993"
dim datedate as date
datedate = System.DateTime.Parse(datestr)
VB2005 throws
The string was not recognized as a valid DateTime. There is a unknown word starting at index 1.
TOPSie
|
|
|
|
|
You now have to use DateTime.ParseExact[^] and supply the format string that describes the format in which it should expect the date. Read the link I supplied, near the bottom, for an in-depth description of how ParseExact works and creating custom format strings to tell the parser what to expect.
|
|
|
|
|
Thanks for this - what a giant leap - backwards.
If I understand this then 7 November 1993 has a format string of "d MMMM YYYY"
But all my dates (and the data has LOTS of them) are in the format
7th November 1993. I can find nothing in your link that shows me a format to cope with "th" (or "st" or "rd"). I presume I am going to have to strip these out of the input string myself - being careful with AuguST etc.
As I said a great leap forward - one line of code turns in to 10 or more!!!
STOP PRESS
The original error was in DateTime.Parse coping with "7th November 1993"
Following your link I tried ParseExact with a format string of "d MMMM YYYY"
after stripping the "th" out. But ParseExact returned an error.
However going back to just Parse with no "th" in the date string now seems to work.
Thanks again
TOPSie
-- modified at 13:25 Friday 29th June, 2007
TOPSie
|
|
|
|
|
TotalTops1972 wrote: Thanks for this - what a giant leap - backwards.
Not really. This method is more flexible than what it used to be.
TotalTops1972 wrote: But all my dates (and the data has LOTS of them) are in the format
7th November 1993.
This is a really bad format. Sure it's human readable, but it makes it a PITA to use in automated data processing. Forget searching the database between date ranges. This is a string of characters that looks like a date. It's not actually a date value.
|
|
|
|
|
I appreciate your reply, it is a human format. This is raw data which originates from written documents, once upon a time they were handed copied, then scanned, now I get it electronically, but it from a printed document intended to be read by real people!
My program is reading this raw data and immediately converting it into a useful computer format so I can use it - but I have to take the original data in the format it is written.
Thanks to your help I have now got this initial conversion code working in at least one path - just hit another, but now I know how to fix it then it is just a slog to spot all the conversion paths..
My step backwards remark is aimed at Microsoft - backwards compatibility is something they often don't rate too highly.
Thanks again....
TOPSie
|
|
|
|
|
I'd look into using a Regular Expression to get the date string at least partially normalized so ParseExact has a better shot at it.
|
|
|
|
|
I found a way to cope with 'th', 'st', 'nd' and 'rd'. It's not that pretty but if you wrap it up into a function you've got a workable solution. It would be nice if you could just ignore characters, then you could use something like "d##MMMMyyyy" where # would be a character that's ignored. However, I couldn't find anything in the documentation that would lead me to believe that's possible. Anyway here you go.
' Valid date formats
Dim validFormats As String() = {"d'st'MMMMyyyy", "d'nd'MMMMyyyy", "d'rd'MMMMyyyy", "d'th'MMMMyyyy"}
Dim myDate As Date = Date.ParseExact("1stDecember1993", validFormats, Globalization.CultureInfo.CurrentCulture, Globalization.DateTimeStyles.None)
Your original post showed no spaces for the date...it was 7thNovember1993. If that's not the case just add appropriate spaces into the formatting strings and it should work.
|
|
|
|
|
Hi All,
I have made my custom textbox with different Properties,
I have in that Readonly Backcolor , Onfocus Backcoolor and so on. Also ReadOnly Forecolor, Onfocus Backcoolor and so on all such different Properties.
Now I want
BackColor--->
------------>OnFocus
------------>ReadOnly
------------>Normal
------------>Disabled
Now i want this to be under + sign , same as we have Font and with it we have
Font--->
------------>Bold
------------>Size
------------>Italics
------------>Family
How can I achieve this ??please help
Regards & Wishes
Navneet Hegde
Nashik(City Of Pilgrimage)
Develop2Program & Program2Develop
|
|
|
|
|
How to make custom property editors, here[^].
|
|
|
|
|
Hi,
I am using VS2005.I want to Read the Content from MS Word and MS Excel with out the help of
Word Object Library or Excel Object Library and Display to the Windows form in VB.Net.
Help me to Read the Content..
Thirukumar.
|
|
|
|
|
thirukumar wrote: I want to Read the Content from MS Word and MS Excel with out the help of
Word Object Library or Excel Object Library
Then what do you plan to use? Without using the Word and Excel object libraries, you just made your job about 100 times more difficult.
|
|
|
|
|
hey i need help in calculator program .... can any one send any artical or code on it
|
|
|
|
|
1. Please read the forum guidelines. Everyone here needs 'help' so please be more specific.
2. You are asking for general code that if you search hard enough you will probably find the code. Try Google.
3. This is a forum for people who are having problems with existing code to get help. Asking us for all the code you need is considered rude.
______________________
stuff + cats = awesome
|
|
|
|
|
Hey Ash...
Just begin yourself first, the way you see the calculatot u have around,
First with the User Interface.
Codeproject is always there to help you .
Regards and Wishes,
Navneet Hegde
Nashik(City Of Pilgrimage)
Develop2Program & Program2Develop
|
|
|
|
|
|
Please Post your Questions with Suitable Subject as Leckey said.
Calculator[^]
Regards,
Satips.
|
|
|
|
|
I am using the AJAX tab control on a page and it contains a DropDownList which is populated at runtime. When the page is refreshed at postback, the Dropdownlist is cleared. The Viewstate property is ON for DDL and the page. I am unable to understand why is this happening.
I have tried by putting the DDL outsite the Tabs with no luck.
Working under
Visual studio 2005
Microsoft windows Server2003
|
|
|
|