|
HI,
I Have made a small change in you code . you initialize the ADODB object in called procedure insted of calling procedure.
here is the code
calling procedure
Dim CN As ADODB.Connection
Call SetDBConf(CN)
and
Public Sub SetDBConf(CN As ADODB.Connection)
Set CN = New ADODB.Connection
CN.Provider = "Microsoft.JET.OLEDB.4.0"
CN.Properties("Data Source") = "c:\frmmain\pathsoft.mdb"
CN.Open
MsgBox "opend"
End Sub
i think this will solve your problem......
bye
Regards
ciacia
|
|
|
|
|
suppose i want to connect to a site through ftp over SSL.how could i do it. i have downloaded many
source code for ftp, they work fine but can not connect to a specific site becasue those code
can not connect to that ftp site through SSL.so pls tell me how could i solve this problem
or give me few url from where i can download free cost advance ftp library which comes with all
the advance ftp feature.pls help me out.
tbhattacharjee
|
|
|
|
|
|
sir first of all thanks for ur response but my ftp problem is not solved. according to you i download the library for ftp over ssl but ftp client has only function for connection to remote server but i want that library should have function like filelist,uploadfiles,downloadfiles,rename,remove etc.so this type of feature was not, so if u know any other better solution then please help me.
tbhattacharjee
|
|
|
|
|
suppose at specific time or at specific time of sunday and monday a function will be called.
pls help me with sample code or give me a url from where can download free cost scheduling
library.i have download few library for scheduling but those are useless.so pls help me.
tbhattacharjee
|
|
|
|
|
have u tried this?
http://www.codeproject.com/csharp/taskschedulerlibrary.asp
|
|
|
|
|
Hi all,
I need to find a way if there is a way to send keys to an already open internet explorer page's text box. If it is possible a step by step explaination would be greatly appreciated. Thanks For Looking !!!
|
|
|
|
|
Sending text to a textbox in an HTML page that you have opened using a WebBrowser control in one of your own forms is pretty easy. You just enumerate the html elements until you find the textbox and you can input anything you like.
However, hooking into a running instance of for example IE6 is extremely complex. You have to find the correct COM interfaces for the browser application, and that is just the beginning. You can search for articles on CP about hooking into IE, but it is a very, very difficult task.
|
|
|
|
|
Hi everyone,
Can someone help me with following code
Dim temp1 as decimal
dim temp2 as decimal
dim result as decimal
temp1 = CDec(txtvalue1.text).tostring("N4")
temp2 = Cdec(txtvalue2.text).tostring("N4")
result = temp1-temp2
txtfinalvalue.text = Cstr(result)
what is wrong in the above code? I have decimal values in two textboxes and I need to subtract them and display the result as a decimal value into the third textbox.
thankyou all in advance
Aartee.
...HE is watching Us All!
-- modified at 21:50 Wednesday 14th September, 2005
|
|
|
|
|
BORN...again! wrote:
temp1 = CDec(txtvalue1.text).tostring("N4")
temp2 = Cdec(txtvalue2.text).tostring("N4")
r
Change this to:
temp1 = CDec(txtvalue1.text)
temp2 = Cdec(txtvalue2.text)
...Steve
|
|
|
|
|
Hi Steve,
Thankyou for your prompt help.
I tried it like you said but i still get the error as
"System.InvalidCastException: Cast from string "" to type 'Decimal' is not valid."
Any more tips?
thanks a ton
Aartee.
...HE is watching Us All!
|
|
|
|
|
One of those textboxes doesn't have anything in it when this code runs. Put those two CDel lines in seperate Try/Catch blocks to make sure the values are filled in with 0 if the strings enter into the textbox's are not valid numbers.
Try
value1 = CDel(textbox1.Text)
Catch
value1 = 0
End Try
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave is correct. You need to ensure the data being converted is valid before the conversion takes place otherwise an exception can be thrown.
...Steve
|
|
|
|
|
Thanks guys, I initialised the values of the variables and Bingo!thanks for all the help.
Aartee.
...HE is watching Us All!
|
|
|
|
|
I have a program that puts out asc code... and sends it to an overhead speaker system...
The problem is the program was made to send asc code to a camera controller and not audio controller.. So the asc is sent out before the radio receivers triangles on one area.. and the program continues to send out the asc codes making the camera relocate this is all fine.
But i need the com port to hold the data in a buffer until the area is found.
Thinking of using vb script or VB and use a counter then send the asc out on com2
rm130@ hotmail.com
|
|
|
|
|
Huh? This question is a bit garbled! Can't be done unless you have access to the source code that sends the control sequence to the camera. The COM ports don't hold-and-store data themselves.
...Steve
|
|
|
|
|
After a DataGrid is loaded with data, what is the best way to call up the data from selected rows and cell? I have a project where I need to pass the values from a selected row into various text boxes to allow someone to edit them. Any help would be appreciated.
|
|
|
|
|
I reply to you if you are using MSFlexGrid
text1.text=Grid.TextMatrix(Grid.Row,Grid.Col)
Text1 is you text box. Grid is object of MS Flex Grid Control
Grid.Row is your selected Row and Gird.Col is your selected Column
Grid.Textmatrix(Row,Col) will return what is stored in the cell.
And similarly
Grid.TextMatrix(Grid.Row,Grid.Col)=text1.text
to re-adjust it.
Shoaib Nawaz
|
|
|
|
|
Not sure if this is the best way but it works for me.
The following code runs when the user wants to edit the the grid data. I put this in the button click.
Dim cm As CurrencyManager
cm = DataGrid1.BindingContext(DataGrid1.DataSource, DataGrid1.DataMember)
Dim xdrv As DataRowView
xdrv = cm.Current
Dim xrow As DataRow
xrow = xdrv.Row
Form2.Tag = CStr(xrow.Item("PrimaryIndexField"))
Then in Form2 locate for the Tag property value in the DataTable Form2 uses.
|
|
|
|
|
Use the DataGrid Cell_Changed Event of the DataGrid
the code in the Cell_Changed Event handler may be like
TextBox1.Text = DataGrid1.Item(DataGrid1.CurrentRowIndex, 0) for first column
TextBox2.Text = DataGrid1.Item(DataGrid1.CurrentRowIndex, 2) for second column
and so on
Thank You
|
|
|
|
|
I have a dataset that was filled with 15 rows of 7 columns from an SQL database. The desired row in the dataset is selected from a dropdownlist combobox. How do I select the different columns within the row? More specific, if the combobox selection is index 2, how do you access the value of App from the dataset?
Dataset Layout:
DID Dist Num App HR Sec SIS
My code so far:
Dim myCMD As OleDbCommand = New OleDbCommand
Dim myAdapter As OleDbDataAdapter = New OleDbDataAdapter
Dim dsDistrict As DataSet = New DataSet
Dim objDistrict As DataView
Dim intDistrictIndex As Integer
Dim MZKApp As String
Dim MZKHR As String
Dim MZKSec As String
Dim MZKSIS As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
myConn.ConnectionString = "Provider=" & …
myConn.Open()
myCMD.CommandText = "SELECT * FROM GTWDistricts ORDER BY Num"
myCMD.Connection = myConn
myAdapter.SelectCommand = myCMD
dsDistrict.Clear()
myAdapter.Fill(dsDistrict, "GTWDistricts")
cbDistrict.DataBindings.Clear()
objDistrict = New DataView(dsDistrict.Tables("GTWDistricts"))
cbDistrict.DataBindings.Add("text", objDistrict, "Dist")
cbDistrict.DataSource = objDistrict
cbDistrict.ValueMember = "DID"
cbDistrict.DisplayMember = "Dist"
cbDistrict.SelectedIndex = 0
SetDBNames()
myConn.Close()
Private Sub SetDBNames()
MZKApp =
MZKHRFin =
MZKSecur =
MZKSIS =
End Sub
|
|
|
|
|
Hello. I'm new in this field and I'm looking for documentation regarding visual basic.net. What I am trying to do is to transform some application I developed in MS Access with VB script in VB.NET. I've decided to use the jet engine because the database will never have a size bigger that 1GB (I expect more like 200MB maximum)... So... what I need is books about jet engine working with vb.net. Send me some links pls or some e-books. Thank you very much.
Regards.
Gabriel
|
|
|
|
|
There are heaps of articles online about connecting an Access database to VB.NET. Try google.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
The best site for Ebooks that I have explored so far is
http://giuciao.atspace.org
I hope you will love this site
Thank You
|
|
|
|
|