|
i saw the C# Grid by Davide Icardi. i am using vb.Net how can i use this with VB.Net codes
thanks
tunde aransiola
|
|
|
|
|
|
I know in visual studios before 2005 you could make a database connection in server explorer then simply drag and drop the connection path to the form and it would make the connection strings and all for you. It doesn't appear to work in 2005 this way.
Basically I wanted it to make the oledbconnection and all for me like in the old days. Sure I can code it manually but it would be more convenient the old way. Is there something I'm doing in correctly cause honestly I don't even see the old oledbconnection dataset and so on controls in the tool box like they use to be.
Just started playing 2005 version so please pardon my ignorance.
Win32newb
"If I wrote a book like I code. It would be one page thick and contain only one word (DUH!)"
|
|
|
|
|
win32newb wrote: I know in visual studios before 2005 you could make a database connection in server explorer then simply drag and drop the connection path to the form
Mixing the UI and the data layers? Uugh... This whole dragging and dropping database connections on to the form encourages some of the worst designs for software. You really ought to try and get out of the habit of doing that.
win32newb wrote: Basically I wanted it to make the oledbconnection and all for me like in the old days. Sure I can code it manually but it would be more convenient the old way.
Sure, it's convenient. But it make the software a maintenance nightmare.
Sorry that I am not more sympathetic to your plight, but you should really consider creating some sort of DAO (Data Access Object) of your own to manage all database connectivity within your application. Then you don't have to worry about dragging and dropping connections all over the place, because you already have a class that does all that for you.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
You wouldn't happen to have a good url that would explain how to do this in code would you. Its been a while since I have coded using visual studios and things have obviously changed.
Please give me a url other than a generic google.com or msdn.com.
Also, what happen to the code that windows compiler generates? What I mean is in 2002/2003 version you could click on the designer and you would see a region that says windows generated code so you could find things that the compiler made for you and modify them if needed. I don't see that anywhere now when I click on the designer in 2005.
Sorry to be a pest and hope I'm not just getting back into the game and I'm lost
Win32newb
"If I wrote a book like I code. It would be one page thick and contain only one word (DUH!)"
|
|
|
|
|
win32newb wrote: You wouldn't happen to have a good url that would explain how to do this in code would you. Its been a while since I have coded using visual studios and things have obviously changed.
Do what in code? Create a DAO? That has never changed as it wasn't a function of VS in the first place. You should do a search on "Layering Pattern", "Data Access Layer" or "Data Provider" - I know you didn't want a generic search engine link, but I don't have the time to look for every document that might help you. It really is a skill you ought to learn if you don't already know how to use internet search engines.
win32newb wrote: Also, what happen to the code that windows compiler generates? What I mean is in 2002/2003 version you could click on the designer and you would see a region that says windows generated code so you could find things that the compiler made for you and modify them if needed.
.NET 2.0 supports a concept called partial classes. That means the class is split over two or more files. In the solution explorer you can expand the form class and see more files underneath it. The windows designer code is in there. This is not the compiler that generates this code, it is the visual studio designer. You should never edit code created by the code generator, this is increasingly true in VS2005 because VS regards the designer file to be its own that no one else will touch.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Hi!!
I'm just beginning to learn vb.net. I'm trying to implement sobel and canny edgedetection in vb.net.I have some set backs in it.I would greatly appreciate if any one can give me working source code in vb.net or give a link to pages containing it.please!!
signing off is preci
|
|
|
|
|
I made the vb.net and sql server connection programically. Now the problem is I want to add, delete the records in sql server by vb.net front end programically.
Please help me
Thanks and Regards
Pankaj Garg
-- modified at 5:46 Sunday 26th February, 2006
|
|
|
|
|
You can issue any SQL commands throught the SqlCommand object. If you don't know SQL already, now would be a good time to learn.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
In treeview I populated all the drives with their files and folders programically . Now the problem is I got stuck in attaching their icon with their files and folder programically (at run time).
Please help me.
Thanks and Regards
Pankaj Garg
|
|
|
|
|
pankajgarg12 wrote: Now the problem is I got stuck in attaching their icon with their files and folder programically (at run time)
If your asking how to attach an icon to a particular item, Joshua already gave you the answer[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 12:18 Sunday 26th February, 2006
|
|
|
|
|
I have a tree control and a combo box in the form.Whenever I select the particular node the full path of the node gets added in the combobox.
Now the problem is , When I select the particular item in the combo box , the concerned node does not get selected in the tree control.So what is the code to select the tree control node programically through the combo box.
Thanks and Regards
Pankaj Garg
|
|
|
|
|
What I recommend that you do is store each node's path into its TreeNode.Tag property.
When a ComboBox item has been selected, do a recursive search for that path starting at TreeView.Nodes.
Once you've found the right node, assign it to the TreeView.SelectedNode property.
|
|
|
|
|
I have a simple applicqation that ued about 45 tables, sored in Win-20043 server. I have to do some report design for the Database.
To solve the problem , I downloaed the table and frontend to my laptop and used the linked table mager to linke the front end and the tables.
Now tthe trouble starts; I update 4 report tables from querying some other tbales in VBA- access 2002.
IF I stop the application in dubug mode and examine the Tables- they have same data. Even more so IF I edit a row in one table other tables change values in the same row and column.
However the Data in the tables are different, If I examine the back end. I have tried to understand if thyere is any relationsip- it appers to be none.
Any ideas will be appreciated.
Tapas Shome
System Software Engineer
Keen Computer Solutions
1408 Erin Street
Winnipeg, Manitoba
Canada R3E 2S8
www.keencomputer.com
-- modified at 3:21 Sunday 26th February, 2006
|
|
|
|
|
Hi,
I have an application in vb.net that produces a report using ReportViewer (visual studio 2005). What would be the best method to convert the text on my reports from english to french for french speaking end users?
Thank you,
Rashar
-- modified at 22:18 Saturday 25th February, 2006
|
|
|
|
|
Rashar,
Deploying Reports and ReportViewer Controls
Deploying Localized Versions of ReportViewer Controls
The ReportViewer control includes language packs for eight languages: Chinese-Simplified, Chinese-Traditional, French, German, Italian, Japanese, Korean, and Spanish. To use a localized version of the control, you must do the following....
http://msdn2.microsoft.com/en-us/library/ms251723.aspx[^]
hope this helps.
progload
|
|
|
|
|
Oh Perfect!
Thanks so much.
|
|
|
|
|
Is is possible to programatically determine the location of installed software? For example, when the user goes through the installation wizard of, for example, Microsoft Word - but decides to change the "default" location to one of their own choosing, can I have my VB.NET code discover where the user chose to install it to - without searching everywhere for WINWORD.EXE?
|
|
|
|
|
|
I bound several controls to columns in a dataset that was populated from a swl server table + additional connections for some comboboxes. I am adding another form to obtain a search/filter options from user. I understand to filter I need to be using a view rather than dataset.
I am confused about how to properly bind the controls to the main population, yet beable to filter to show only a subset if the user chooses. I assume I can reset on a button back to full pop. Could someone give me a brief explanation and provide some code examples? I realize this is asking much!
frmMain has textboxes and comboboxes. Most of the controls are bound like:
txtCity.DataBindings.Add(New Binding("Text", DsAppLog11.Tables(0), "City"))
txtFirstName.DataBindings.Add(New Binding("Text", DsAppLog11.Tables(0), "First_Name"))
I have navigation controls that move to next/previous record. I am trying to apply the logic introduced from the search form to filter or repopulate the data user sees on frm main. To accomplish this I was trying to switch to a view rather than dataset since I understood a fiew could be filtered or sorted and dataset could not? I tried a test binding like:
txtAppID.DataBindings.Add(New Binding("Text", dvAll, "id_num"))
When testing and stepping thru records this data was the only one that would not change with the data from next record. It would show the initial value but no change when stepping to next. I realize that the navigation is still tied to dataset and I assume that this is the reason the control does not change when th record does:
Me.BindingContext(DsAppLog11.APPT_LOGS).Position += 1
I am confused about many things but let me focus on the following:
I need to be able to apply the search logic to the data seen in frm main. When finished, on a button I need to allow the data to be switched back to the full population minus the filter. Can you give me a little directional guidance and code sample to help me along?
|
|
|
|
|
I wonder if anyone can help me. The situation is that I cannot seem to display my dataset I have created in VB.Net onto my crystal report. In the Crystal report I have inserted the database nwind.mdb and using the employees table. No matter what I do, I seem to get all the records in the Employee table. What am I doing wrong. I have attached the code I am using.
Private Sub cmdCR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCR.Click
Dim DA As OleDb.OleDbDataAdapter
Dim DS As New DataSet
Dim strSQL As String = "SELECT EmployeeID, LastName, FirstName FROM EMPLOYEES where EmployeeID = 1"
Dim strReportPath As String = "C:\Temp\report1.rpt"
Try
DA = New OleDb.OleDbDataAdapter(strSQL, sOleDbConnection)
DA.Fill(DS, "Employees")
'Load Crystal Report's rpt file
Dim cr As New CrystalDecisions.CrystalReports.Engine.ReportDocument
cr.Load(strReportPath)
cr.SetDataSource(DS.Tables("Employees"))
CrystalReportViewer1.ReportSource = cr
Catch ex As Exception
MsgBox(Err.Description)
End Try
End Sub
|
|
|
|
|
I done the following and it seems to work. I added a paramter on the crystal report called it ABC and done the following code....
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim strReportPath As String = "C:\Temp\report1.rpt"
Try
'Load Crystal Report's rpt file
Dim cr As New CrystalDecisions.CrystalReports.Engine.ReportDocument
cr.Load(strReportPath)
'Declare the parameter related objects
Dim param1Fields As New CrystalDecisions.Shared.ParameterFields
Dim param1Field As New CrystalDecisions.Shared.ParameterField
Dim param1Range As New CrystalDecisions.Shared.ParameterDiscreteValue
param1Field.ParameterFieldName = "ABC"
param1Range.Value = 3
param1Field.CurrentValues.Add(param1Range)
param1Fields.Add(param1Field)
CrystalReportViewer1.ParameterFieldInfo = param1Fields
Dim rpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
CrystalReportViewer1.ReportSource = strReportPath
CrystalReportViewer1.Refresh()
'Set the CrystalReportViewer's apperance and set the ReportSource
CrystalReportViewer1.ShowRefreshButton = False
CrystalReportViewer1.ShowCloseButton = False
CrystalReportViewer1.ShowGroupTreeButton = False
Catch ex As Exception
MsgBox(Err.Description)
End Try
End Sub
|
|
|
|
|
i am trying to insert the data from database to mircosoft chart control but when i use the code below, the data reader read till the end of record, and how i going to store in one by one to the chart control??? Anyone can help?
Thank you.
Dim strSales(,) As String
Dim i As Integer = 0
Dim count As Integer
Dim data As String
Dim num As Integer
Dim mySelectQuery As String = "SELECT ID,sales FROM sales"
'Dim countquery As String = " SELECT COUNT(sales) FROM sales"
Dim myConnection As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"DATA SOURCE=C:\Program Files\Microsoft Office\OFFICE11\SAMPLES\db2.mdb;User Id='admin';Password='';")
Dim myCommand As New OleDbCommand(mySelectQuery, myConnection)
' Dim myCommand1 As New OleDbCommand(countquery, myConnection)
myConnection.Open()
Dim myReader As OleDbDataReader
myReader = myCommand.ExecuteReader()
' Always call Read before accessing data.
' For i = 1 To 11
'
While (myReader.Read())
'(myReader.GetValue(0)) '+ ", " _
' + myReader.GetString(1))
'{{"Location", "Thousands of tons of steel"}, _
'strSales(1) = myReader.GetValue(0)
' While (i = i)
strSales = New String(,) _
{{myReader.GetString(0), myReader.GetValue(1)}}
' MessageBox.Show(myReader.GetString(0))
' MessageBox.Show(myReader.GetValue(1))
' End While
' i += 1
End While
chSales1.ChartData = strSales
' MessageBox.Show(strSales(1))
' Next i
' always call Close when done reading.
myReader.Close()
' Close the connection when done with it.
myConnection.Close()
sdasasd
|
|
|
|
|
As you've discovered, the Microsoft Chart ActiveX control is underdocumented and is not easy to use.
I recommend that you use a different Chart control and one that was built in .NET. I highly recommend ZedGraph[^]. The charts come out nicer, it's better documented, has plenty of code examples, and it's free.
|
|
|
|
|
Joshua Quick wrote: I highly recommend ZedGraph[^]
I must agree with Joshua. ZedGraph is really better to use than ActiveX.
Paul
|
|
|
|