|
Hi Johnson,
Thnx for your reply. I understand that this can be done the way you mentioned. However, is it feasible to allow a user to perform these tasks. Also, the users may not agree with it.
Is there a way like we have in asp where we can set the path at runtime using server.mappath...Also, the access db's will be stored in the same folder as the application.
thnx.
Mayur
|
|
|
|
|
There are several options. You can store the Database location in the registry or preferably in an application or user config file. You can then read the file at runtime and use a connection string as in the post above.
Jon
|
|
|
|
|
Hi Jon,
Thnx for your reply. Since I am fresher in .NET, I would appreciate if you could provide me some example or code, which would help me understand the soln correctly.
Mayur
|
|
|
|
|
|
Guys,
Is it possible to change ConnectionString in a Dataset in run time ?
WiL
|
|
|
|
|
DataSets don't have connection strings. Can you explain your problem in more detail?
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Colin Angus Mackay wrote: DataSets don't have connection strings. Can you explain your problem in more detail?
I want to access multiple DBase database files. The idea is to create a dataset and when everytime I browse for a DBF file, its automatically point the dataset to that file. Is it possible using dataset?
Thank you
WiL
|
|
|
|
|
Just create a new data set and dump the old one. DataSets are disconnected data - they don't belong to a data source. If you want to perform operations between a DataSet and a data source you need to use an adapter to plug the two things (temporarily) together.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I'm sorry for this very noob question, but how to create dataset or data source at runtime ?
Thank you for replying so fast
WiL
|
|
|
|
|
shiroamachi wrote: but how to create dataset or data source at runtime ?
By data source I just mean a source of data like SQL Server, Access, dBase, etc.
To create a dataset look at the code that visual studio generated for you when you added the dataset and data source in the designer. Alternatively, just about any tutorial on ADO.NET will show you the various ways in which you can create DataSets
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
hi,
how can i add the user shortcut keys at runtime in the applicaion
FAILURE is the first step towards SUCCESS
|
|
|
|
|
try the following code....
' Appends a shortcut key to the caption of a menu item.
Public Sub AddMenuShortcut(Menu As Menu, Shortcut As String)
Menu.Caption = Menu.Caption & vbTab & Shortcut
End Sub
This code fragment adds shortcut keys to commands on the Edit menu:
Private Sub Form_Load()
AddMenuShortcut mnuEditUndo, "Ctrl+Z"
AddMenuShortcut mnuEditCut, "Ctrl+X"
AddMenuShortcut mnuEditCopy, "Ctrl+C"
AddMenuShortcut mnuEditPaste, "Ctrl+V"
AddMenuShortcut mnuEditDelete, "Del"
End Sub
FAILURE is the first step towards SUCCESS
|
|
|
|
|
How I can create a button in ie toolbar.
I want Add Link to ie Toolbar when clicked on link ,go to
<www.your-site>by vb programing.
Is it possible?
Signed By S.E
|
|
|
|
|
You mean u click the button in internet explorer toolbar to link to vb programming.
|
|
|
|
|
Dear Ramani.r
Yes, I want add one button in internet explorer toolbar,then when click the button be link.
if I need the component for project?
I hope I have made my self clear
any suggessions please.
thaks for your reply.
Signed By S.E
|
|
|
|
|
Hi all,
I am new to this forum so please bear with me until I learn how things are done here.
I am trying to write a “VB-6” program where the user can click on a picture of a part and the program then opens an “Excel” price list for them. I used a transparent text box over the picture. You can start the program, click the picture, and an “Excel” window opens with the proper line highlighted. Then, if you close the “Excel” window and try to click on the picture again, the program balks. Part of the “Excel” window appears but it is empty. The program doesn’t crash. It just refuses to show the “Excel” sheet again.
This is the code that I used:
Dim AppExcel As Excel.Application
This sub sets the focus on the picture so the scroll bar doesn’t blink.
Private Sub Form_Activate()
p4l80e.SetFocus
End Sub
This sub tells the program to open “Excel”.
Private Sub Form_Load()
Set AppExcel = CreateObject("Excel.Application")
Workbooks.Open FileName:="D:\K and D (152598).xls"
End Sub
This sub makes “Excel” visible, finds the proper row, and highlights the entire row.
Private Sub lbl034_Click()
'On Error GoTo erh
AppExcel.Visible = True
Cells.Find(What:="34034b", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
'Highlights the entire row.
If IsEmpty(ActiveCell) Then Exit Sub
On Error Resume Next
If IsEmpty(ActiveCell.Offset(0, -1)) Then Set LeftCell = ActiveCell Else Set LeftCell = ActiveCell.End(xlToLeft)
If IsEmpty(ActiveCell.Offset(0, 1)) Then Set RightCell = ActiveCell Else Set RightCell = ActiveCell.End(xlToRight)
Range(LeftCell, RightCell).Select
Exit Sub
erh: MsgBox Error(Err)
End Sub
This is a different attempt at the above code with a different part number. It will work the first time around also. Second attempt, it also will not respond.
Private Sub lbl070_Click()
On Error GoTo erh
'Set AppExcel = CreateObject("Excel.Application")
Workbooks.Open FileName:="D:\K and D (152598).xls"
Cells.Find(What:="34070e", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
AppExcel.Visible = True
Exit Sub
erh: MsgBox Error(Err)
End Sub
The following code works fine. It just controls the scroll bar to move the picture of the parts to be selected.
Private Sub scr_Change()
On Error GoTo erh
p4l80e.Top = scr.Value
' p24L80E.Top = scr.Value + 12500
erh:
End Sub
Private Sub scr_Scroll()
Call scr_Change
p4l80e.SetFocus
End Sub
I am FAR from a pro. at this. I just taught myself from books that I bought so I might not understand a reply unless it’s kept pretty simple and straight forward.
Thanks in advance, Garner
hi,
just close the workbook and also quit the excel application before exiting the Sub routine.
Paritosh
Hi again & thanks to Paritosh,
I thought that this was the problem but I haven't figured out how to fix it. If I use a "close" event in the sub that shows the "Excel" workbook, the workbook flashes on the screen and back off before you get to look at it. I tried to put it in my main form "activate" sub and that didn't work either. I need this to happen automatically as the user closes the "Excel" window so they can just click on another part of the picture.
Could you give me an idea of what the code would look like and what sub to put it in? Like I said, I'm "self-taught" in "VB" so my teacher isn't the sharpest tool in the shed.
Thanks again, Garner
|
|
|
|
|
Is it possible to create multiple websites on windows 2003 servers with VB.NET ??
I can't seem to find some material on this ...
// Dammark
|
|
|
|
|
What do you mean?
Based on the "face value" meaning of your question, the answer is common-sense, of course it's possible. But, I could be misunderstanding the question.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
I need anyone of you guys to give me a brief idea as to how i can do the communication with a tracker and handle a Bittorrent Client with it. Any suggestions or ideas are welcome. PLz i need this info for my Project. Help me out Guys. Or can anyone of u actually write a library to handle all the network management. That would be asking for too much but its worth a shot. Thanx again and forgive my ID. PLz start registrations, i'll make a good ID. Thanx. Cya. Bye. Reply soon at devraj_raut@yahoo.com
Devraj Raut!!!
|
|
|
|
|
Forgive my id ? That's a ripper. Why don't you change it ? If you can't work out how to navigate the site, then perhaps even VB is going to be too complex for you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: Forgive my id ? That's a ripper.
I think that is because Dave ripped into him earlier[^] about it.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Yeah, I saw that. It doesn't really help tho, does it ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Why would someone even pick that name in the first place is beyond me. He's a registered user, so I have no idea what he's talking about as far as "turning on registrations".
So, is anyone going to bail him out of his "deadline" problem? It would seem that he'll spend 2 months on the UI, and some other sucker will spend that time doing the "real" work. Does this sound familiar to anyone?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Just FYI, this ID is one registered for bugmenot.com (a great site)
|
|
|
|