|
|
Hi guys,
I started my project on VB, stating it was a Database application.
Doing that , the project was embedded to my database.mdb file, so now I could see a nice GUI of all my tables.
The thing is that I need to choose the mdb in runtime, using a "File Open" dialog box.
Me.ProductOrdersTableAdapter.Fill(Me.PlugDataSet.ProductOrders)
Me.PORowsTableAdapter.Fill(Me.PlugDataSet.PORows)
Me.PINSerialTableAdapter.Fill(Me.PlugDataSet.PINSerial)
Me.CustomizationTableAdapter.Fill(Me.PlugDataSet.Customization)
Me.FirmwareTableAdapter.Fill(Me.PlugDataSet.Firmware)
- All these (for example) have been added to my form1.vb code. the thing is that PlugDataSet and ProductOrdersBindingSource were all generated inside the project files. All I want to do is change the DB source in runtime.
How can I change the connection string for the mdb file and not affect all my code ?
Thx
|
|
|
|
|
Assuming that your dataAdapter is an OLeDB adapter.
Here is what you can do.
Change the connection string of dataadapter in button click event.open a fileopendialog box in the buttonclick event
'textPath is a textbox which displays the selected db path
Private Sub dbConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dbConnect.Click
OpenFileDialog1.ShowDialog()
txtPath.Text = OpenFileDialog1.FileName
Dim DBString As String
DBString = "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Data Source=" & txtPath.Text & ";Jet OLEDB:Engin" & _
"e Type=5;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB" & _
":SFP=False;persist security info=False;Extended Properties=;Mode=Share Deny None" & _
";Jet OLEDB:Encrypt Database=False;Jet OLEDB:Create System Database=False;Jet OLE" & _
"DB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=F" & _
"alse;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1"
dataconn.ConnectionString = DBString
End Sub
I hope this helps
Mandar Patankar
Microsoft Certified professional
|
|
|
|
|
I am not too sure about what type of connection it is. It seems like when I started the project and chose a Database project, VB.Net made a class out of the database, named it and made methods for it.
I am not too familiar with VB, and all I found was XML files that define the connection strings...
And all came out of simply starting a New->Project->Database
I am quite lost with it,
Thx
|
|
|
|
|
My question is who is my dataconn which I should modify ?
|
|
|
|
|
Hi All,
I am working on VB6.0 app, and was wondering if I can call a VB.net executable from the VB6.0 application? Please let me know.
Basically, I want to avoid writing the new code in VB6.0, instead do that in VB.net
Thanks a lot!!
|
|
|
|
|
Shell (application path)
or
shell.execute(application Path)
not matter in which language and which application you are trying it will run
Rizwan Bashir
|
|
|
|
|
Which reference do I have to add, because if I put Application shows me a message error
PS: I'm using Vb Net 2003
|
|
|
|
|
In VB6 you can execute an app like this...
Private Sub Command1_Click()<br />
Dim myfile As String<br />
myfile = "C:\bin\WindowsApplication1.exe" ' where the app is example<br />
Shell (myfile)'call the app<br />
End Sub
in vb.net this is how you execute a file....
'imports....<br />
<br />
Imports System.Diagnostics.Process<br />
<br />
'code...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim myfile As String = "C:\bin\WindowsApplication1.exe"<br />
Dim myprocess As Process<br />
myprocess.Start(myfile)<br />
End Sub
hope this helps!
good luck
andy
|
|
|
|
|
Thank you all for your suggestions, it worked.
|
|
|
|
|
How can I show a master-detail relation in a single datagrid.
Can anybody help me.
Thank you
Suman
|
|
|
|
|
Create a master detail Dataset and there after bind that dataset to datagrid.
Mandar Patankar
Microsoft Certified professional
|
|
|
|
|
Mr. Patankar,
Can you provide me any URL where i can get a sample code on it.
Thank you,
with Regards
Suman
|
|
|
|
|
i have created a simple web service for doing mathematical operations. while i'm trying to open that web service in another machine, it opens but with out the services. what actually i have to do in order to access that particular web service in another machine?
Thanks
with regards,
K.Vijaya
|
|
|
|
|
First of all you need to start your web service.
and See if you can view the wsdl from another machine.
you can do this by typing your webservice address in webbrowser.
now add a webrefrence to your client after that you should be able to consume the webservce method as normal methods.
Mandar Patankar
Microsoft Certified professional
|
|
|
|
|
is there any provision for deploying a web application?. If so, can any one tell me that if we deploy that web application, whether it will be available when we are using some other system after doing the setup?
thanks
K.Vijaya
|
|
|
|
|
When you use this forum, make sure you are specific in your question! I will assume you are using asp.net within a web application? You’re asking about deployment, as far as I understand it, a web application resides on the server running IIS (internet information services) which make asp a sever-side application. So the only deployment is to register your app in IIS on the server. Make sure everyone who is to use this page as the security privileges needed. You can google basic asp.net walkthroughs.
goog luck
Andy
|
|
|
|
|
hellow to all ..
i am generating a crystal report that have double rows that i would like to remove , let say i have
ID - NAME - ADDRESS
----------------------
1 SSS SSSSS
1 EEE EEDEE
1 TER WEWEE
i would like to remove two rows , and keep one
have can i do this in crystal reports .
if it is the wrong Forum tell me so also ..
thxx
|
|
|
|
|
You need to handle programatically
Some thing like this
With reportDocument.ReportDefinition.Sections("Section3")
DirectCast(.ReportObjects("Borrower"), CrystalDecisions.CrystalReports.Engine.TextObject).Text = dsLockConfirmationCO.LS_LockConfirmation_CO.Item(0).PrimaryBorrower
DirectCast(.ReportObjects("BorrowerName"), CrystalDecisions.CrystalReports.Engine.TextObject).Text = dsLockConfirmationCO.LS_LockConfirmation_CO.Item(0).PrimaryBorrower
DirectCast(.ReportObjects("CoBorrowerName"), CrystalDecisions.CrystalReports.Engine.TextObject).Text = dsLockConfirmationCO.LS_LockConfirmation_CO.Item(0).PrimaryBorrower
End With
Chinna Srihari,
Tech Lead, Capgemini
|
|
|
|
|
hii ,
thank u for the code ..
i need to to translet to me somethings ,
what ReportObjects("Borrower") stand for ?
and what is dsLockConfirmationCO stand for ?
how can i use this code ?
thank u .
|
|
|
|
|
Hi,
This is quit simple
In Report designer we have
Report Header (Section 1)
Page Header (Section 2)
Detail (Section 3)
So in Section 3 we have lables and its value to be displayed.
here ReportObjects("Borrower")--> Borrower indicates value field name
dsLockConfirmationCO is dataset object from which we need to assign the value
Chinna Srihari
Tech Lead, Capgemini
|
|
|
|
|
hellow ,
thank u for ur help ..
but i am sorry i can't figure out how to use the ( dsLockConfirmationCO )
and how do i assign values to it !
can anyone help me ?
thank u
|
|
|
|
|
Hi,
This is how it works.
We need to display the data in report.
One case is retrieve the data from data base, assign it to reports.
here dsLockConfirmationCO is typed dataset which i have populated from database.
In your case you may be retrieving data from data base and display it on the report. So, create your own dataset and populate it and assign the values to report object.
Here in my case dsLockConfirmationCO is dataset do nopt confuse
Srihari Chinna
Tech Lead, Capgemini
|
|
|
|
|
hellow ..
here is my code ,
Dim reportDocument As New rptStationsGroup
Dim dsLockConfirmationCO As New DataSet
dsLockConfirmationCO = New DataSet("BusLines")
With reportDocument.ReportDefinition.Sections("Section3")
DirectCast(.ReportObjects("BusLineNo"), CrystalDecisions.CrystalReports.Engine.TextObject).Text = dsLockConfirmationCO.LS_LockConfirmation_CO.Item(0).PrimaryBorrower
End With
in dsLockConfirmationCO i have a blue line , that say .
'LS_LockConfirmation_CO' is not a member of 'System.Data.DataSet'.
thank u
|
|
|
|
|
Hi Man,
dsLockConfirmationCO is dataset
LS_LockConfirmation_CO is table in dataset
Item(0) is Row
PrimaryBorrower is field in typed dataset
Chinna Srihari,
Tech Lead, Capgemini
|
|
|
|