|
Thanks again my friend for your response
about the sql server i want to save all the info about the chatters and who is online and offline and etc... .
i saw this book on the net and i want to take your opinion about it
"Network Programming in .NET" at
http://www.webtropy.com/
thanks again
with best wishes
smart_sdr
|
|
|
|
|
Awsome book. I have it myself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i'm reading it now it's very interesting book, i like it.
dave if you have a an yahoo id and wanna chat with me so this is my yahoo id and also my msn id :
smart_sdr78@yahoo.com
smart_sdr@hotmail.com
with best wishes
smart_sdr
|
|
|
|
|
Guys,
I need to export an access database table to a txt file within the code
how can i do that? please any help
|
|
|
|
|
Somthing like this:
Private Sub MSAccessToTextFile()
Dim dbConn As OleDbConnection
Dim dbCommand As OleDbCommand
Dim dbReader As OleDbDataReader
Dim swFile As StreamWriter = File.CreateText(Application.StartupPath & "\myfile.txt")
Dim ConnectString As String = "Provider=Microsoft.Jet.OleDB.4.0; data source=" & Application.StartupPath & "\Books.mdb"
Try
dbConn = New OleDbConnection(connectString)
dbConn.Open()
Dim lcSQL As String = "select * from Books"
dbCommand = New OleDbCommand(lcSQL, dbConn)
dbReader = dbCommand.ExecuteReader
Do While dbReader.Read
swFile.WriteLine(dbReader.GetValue(0).ToString() & "," & dbReader.GetValue(1).ToString())
Loop
swFile.Flush()
swFile.Close()
If Not dbReader.IsClosed Then
dbReader.Close()
End If
If Not dbConn.State = ConnectionState.Closed Then
dbConn.Close()
End If
dbCommand.Dispose()
dbReader = Nothing
dbCommand = Nothing
dbConn = Nothing
Catch oErr As Exception
MessageBox.Show(oErr.ToString())
End Try
End Sub
|
|
|
|
|
Thanks for your response
but isn't there a way to export all fields without having to pass the index for each one using GetValue(i) ..?
Sorry if my Q seems silly, but i'm wondering if it could be done in a more general way so it can be used to export different tables with different fields
Thanks
|
|
|
|
|
hi guys,
I met this problem with VB.Net 2003 :
Dim st1 As String
Dim blnResult As Boolean
st1 = "Hello World"
blnResult = st1.StartsWith("lo") 'it must return true but it returned false !!!!!!
is there any info about that ??
thanks
|
|
|
|
|
StartsWith determines whether the beginning of the string matches the specified string
"lo" is not the start
For your case you might wanna use IndexOf
|
|
|
|
|
thanks alot for your response
with best wishes
|
|
|
|
|
how to make a keypress event in vb.net, in the case i am using keypress if i am pressing the number key means that number key is unlocked and other key will be locked
|
|
|
|
|
The standard textbox control comes with a KeyPressed event, just subscribe to it.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
how to arrange the grid control display in the input order using ole db
|
|
|
|
|
Hi,
I have a visual Basic 6.0 project and wanted to add to it couple of ActiveX Dlls.
But when running the Project (Group) the forms that were created in the DLLs, open outside the Main MDI parent.
How can I set these DLLs as MDI children of this main MDI.
|
|
|
|
|
.DLL's as MDI Child??? Forms are MDI Children, not .DLL's.
Of course the forms created in the .DLL's are created outside the MDI Parent. You didn't set the MDI Parent property of the child forms to anything, so they are not children of any form.
You have to add this functionality into your .DLL's so you can set the Parent property from outside the .DLL's.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello All,
I need help to import sub into application.
First i will give a little detail how my application is set so you can help me (And so if i ask this question wrong you may be able to sift through the newbieness)
I have a componts folder that holds all of my class files (Like my comtrols, alot of my controls have their own namespace, class file)
My connection string is in my web.fig file so when ever i create a connection in my class files in my componets folder i write it like so--->... Dim cnn As New SqlConnection(ConfigurationSettings.AppSettings("cnn")) ...
When ever i call the function that returns a result for my control i do it like so-> ... Dim GetCompanyProductsFromTopMenu As New ConstructionSuperCenterCom.WindowTreatmentByCompany
dlCom16.DataSource = GetCompanyProductsFromTopMenu.DataListForProductDisplayFromTopMenuSelection(IDCompany, IDCompanyProductCategory)
dlCom16.DataBind()...
Now, My question here is, how do i get to this sub and correctly implement it?
What i am doing here updating, editing, deleting info from a datagrid and i want to move all of this code to my componets folder and make a call from the behind file to the componts in the folder where needed in the behind file.
============Here is a piece of the code from the behind file that i am wanting to move to the componets folder,-----
Sub dgProducts_Edit(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
dgUpdateProductRestrictions.EditItemIndex = e.Item.ItemIndex
BindData()
End Sub
Sub dgProducts_Cancel(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
dgUpdateProductRestrictions.EditItemIndex = -1
BindData()
End Sub
Sub dgProducts_Update(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)
'Read in the values of the updated row
Dim iProductID As Integer = e.Item.Cells(1).Text
Dim dblPrice As Double = CType(e.Item.Cells(2).Controls(0), TextBox).Text
Dim strName As String = CType(e.Item.Cells(3).Controls(0), TextBox).Text
Dim strDesc As String = CType(e.Item.Cells(4).Controls(0), TextBox).Text
**How would i call the sub dgProducts_Update from the behind file?
Like This----> Dim MyUpdate as new (This would be namespace --->ConstructionSuperCenterCom)
MyUpdate.dgProducts_Update <----------????? i tried this but did not all the way work..
Can anyone help me on this???
Thank you...
Erik.,,..
|
|
|
|
|
Hello All,
I am following an example from an online how to datagrid, bla, bla, anyway, i have a question related to formating money
Here is the datacolumn that the formating is taken place in
<asp:boundcolumn headertext="Price" datafield="UnitPrice" itemstyle-horizontalalign="Right" dataformatstring="{0:$#,###.##}">
**My quesion here is, what is the difference between {0:c}, and DataFormatString="{0:$#,###.##}???
They both seem to produce the same result...
Thanks again,
Erik,,,,,
|
|
|
|
|
{0:c} will use the currency format specified by the CurrentUICulture's NumberFormatInfo which is determined by the Windows locale settings. For U.S. English it would be equivalent to the {0:$#,###.##} literal specification, but if your locale was different, it would format according to the appropriate currency for that locale (Pounds Sterling, Euros, Yen, etc. and would adjust the puctuation as appropriate (some exchange the roles of , and .). Your literal specifier would give the same results regardless of locale setting.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
The opposite of the religious fanatic is not the fanatical atheist but the gentle cynic who cares not whether there is a god or not.
Eric Hoffer
|
|
|
|
|
Thank you,
I will store this information up in my folder vb.net collections,..
|
|
|
|
|
i had made an active x controll that rool the dice on mouse click. now i want that it should be added to the web page tell me how to add any good article or the website.
ddd
|
|
|
|
|
How to gettickcount?
In VB 6.0 ,we could use API of windows by dll.
Now it is impossible in vs.net.
Thanks!
|
|
|
|
|
The System.Environment.TickCount is the property you are looking for.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
When press ENTER key in keyboard, this button will be seleted.
Thanks!
|
|
|
|
|
Set the AcceptButton property of the form to your button. That would do the trick.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I m doing a project on server client appln. I want to make my program so that only administrator can have the databases and the forms on clients should get connected with the admin appln. The code is in VB6.0.
Almost the program is completed but this is the need. Plz help me soon .
Aditya
|
|
|
|
|
If I read your question correctly, this is the norm. The database(s) sit on a server that noone has physical access to unless your the administrator. Your client application connects to the database or database server app, depending on how your application is written.
But, uhhh, you should have designed and written your application(s) with this mind from the beginning. If I understand the question correctly, this is a base design issue that should have been answered and designed for on Week #1, not just before your app is completed.
If your app is almost done, what DBMS are you using and where is the database located?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|