|
Hi am using vb6 and i need help on the following
1)Hi i want to make reports where a user can select the range of data he wants to see from a form ie starting date to ending date, columns per page, starting client name to ending client name.
2)i want to use a picturebox control or image control to display a photo from an access db the field name is photo and the datatype is OLE object. Also help me to use a commondialog control to add and edit the photo at run time.
3) i want a user to be able to search for a record from a datagrid or mshflexgrid using a textbox control i.e. if he wants to search for a client name called charles when he enters the first character c the first record when arranged in ascending is highlighted and if he enters a character like k and there is no client starting with k it displays the nearest record to it.
Thank you.
|
|
|
|
|
stevemwangi wrote:
2)i want to use a picturebox control or image control to display a photo from an access db the field name is photo and the datatype is OLE object. Also help me to use a commondialog control to add and edit the photo at run time.
I used to display the picture from access to VB6, but the photo field is no an OLE object. It is a Memo (contain the string character). The field is store the path point to the picture/image then I will use my VB application load the picture from that path. VB will display difference picture base on difference path of each record. I think if you use OLE object in your database file when the record is increase your database might growth rapidly and your database might stop running when it reach it limite of capacity.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi,
In my VB application i'm trying to embed IE.
So in my code i use:
Dim MyIE As New InternetExplorer
and try to use it properties.
But during runtime i get error as:
"Class Does Not Support Automation or does not support expected interface".
After this i tried installing windowscript 5.6 and
vbrun60sp5.exe..But still same problem.
I'm using VB6.0 SP5. and IE version: 6.0.2800
Pls help.
Thanks
Ram
|
|
|
|
|
I'm not to sure, if it's available , or will work for vb 6, haven't used it for quite sometime, but if you can just add a com control. Look for one Called AxWebBrowser. As that's just a com for IE. Works for what I want it to do in my vb.net coding.
|
|
|
|
|
This may sound like it doesn't fit but update your MDAC, I've seen that error before, and this fixed it.
Microsoft Data Access Components (MDAC) 2.8
http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506396c&displaylang=en
|
|
|
|
|
I need some help in to develop a combo box which has 2 columns one is a display text and other one is a hidden value which will be accessible when user select a value. This is the value is assigned back to the combo box, the control should display the display text for the value if it exist in the list
HELP!!!!
|
|
|
|
|
You may want to take a look at the standard ComboBox as that's the exact functionality.
Here's some code to get you started [Edit: Sorry for the C# didnt realise id swapped forum ]:
A simple data object
private struct MyDataObject
{
private string display;
private object val;
public MyDataObject(string display, object val)
{
this.display = display;
this.val = val;
}
public string Display
{
get{ return this.display;}
}
public object Value
{
get{ return this.val; }
}
}
I dragged a ComboBox to my form and in the form load event I filled it with 2 elements:
<br />
ArrayList al = new ArrayList();<br />
al.Add( new MyDataObject("Val1",1));<br />
al.Add(new MyDataObject("Val2",2));<br />
this.comboBox1.DataSource = al;<br />
this.comboBox1.DisplayMember = "Display";<br />
this.comboBox1.ValueMember = "Value";<br />
I can then set the selected value of my combo box:
<br />
this.comboBox1.SelectedValue = 2;
hope it helps
|
|
|
|
|
thanx man
very good help
you are a VB super Hero
|
|
|
|
|
no problem.
Make that Ex-VB Hero, I gave it up at vn6 hence the c# code
|
|
|
|
|
I have a problem with Visual Studio .net 2002 Enterprise Edition. The code editor freeze during I edit the code, then returns operating for few seconds, then re-freeze...
I've tried all service packs, but the problem persists.
I've formatted and reinstalled windows xp and all applications, but nothing changes.
Please, help me.
|
|
|
|
|
If it is possible you should post the system informatin of your computer on this forum. To check your system information go to Start -> Program -> Accessories -> System Tools -> System Information. On the other hand you should make sure that you have a plan to install your windows and application step by step, and note it when it is slow (ex. it slow after install Ms office... or any other application). Try to apply update from windows update or office update to you computer, if you not sure that your computer system has a currupted system file run SFC command from MSDOS prompt to check your system (But you must keep your CD windows xp in your CDROM drive). Hope it is working fine!!
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Have to tried updating the drivers for your system? Chipset drivers, IDE, video card, ... ?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
What is your processor speed and memory (RAM)?
my blog
|
|
|
|
|
do you have any user controls in the My User Controls Toolbar that don't exsist any more.
That cauases mine to do that.
just a thought.
|
|
|
|
|
I resolved it!!!!
There was a control (plserver.ocx) in my form wich made the problem.
Eliminating it, the problem disappears!
Thank you for your help.
|
|
|
|
|
Hey I have just opened new project and from that selected VB.Net and from that I selected "ASP.NET Web Application" Clicked Ok. And tried to run it and it shows this error "Error: Unable to Start Debugging on the Web Server" I have also found the alternatives for this error and tried all option given in MSDN online help but still not been able to solve it....
Can anyone plz help me out.....
Regards
Amarelia
|
|
|
|
|
This problem will be nearly impossible to troubleshoot over the forums. The first thing I'd look at, though, is to make sure that there are no errors in your Web.config file. After that, it comes down to problems in your applications project files, web server configuration, security, , code issues, ...
At this point, the only thing we can do is refer you to the KB articles...
Search Results[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi, I have a problem that need someone conver give me the sample that conver from my below code. In VB6 I'm very easy to connect to Ms access database. Here is my code.
Dim dbs As DAO.Database<br />
Dim rst As DAO.Recordset<br />
<br />
Private Sub Form_Load()<br />
<br />
' Connect to database.<br />
Set dbs = DBEngine.OpenDatabase("DbPath")<br />
Set rst = dbs.OpenRecordset("SELECT * FROM [TableName]")<br />
<br />
' Check if there is a record in database.<br />
If rst.RecordCount > 0 Then<br />
' Populate the recordset.<br />
rst.MoveFirst<br />
rst.MoveLast<br />
<br />
' Pass the value of the record to the textbox.<br />
Text1.Text = rst.Fields(0).Value<br />
Text2.Text = rst.Fields(1).Value<br />
End If<br />
<br />
End Sub<br />
<br />
Private Sub cmdAdd_Click()<br />
<br />
With rst<br />
.AddNew<br />
.Fields(0).Value = Text1.Text<br />
.Fields(1).Value = Text2.Text<br />
.Update<br />
End With<br />
<br />
End Sub<br />
<br />
Private Sub cmdUpdate_Click()<br />
<br />
With rst<br />
.Edit<br />
.Fields(0).Value = Text1.Text<br />
.Fields(1).Value = Text2.Text<br />
.Update<br />
End With<br />
<br />
End Sub<br />
<br />
Private Sub cmdDelete_Click()<br />
<br />
rst.Delete<br />
<br />
End Sub<br />
<br />
Private Sub cmdFirst_Click()<br />
<br />
rst.MoveFirst<br />
Text1.Text = rst.Fields(0).Value<br />
Text2.Text = rst.Fields(1).Value<br />
<br />
End Sub<br />
<br />
Private Sub cmdLast_Click()<br />
<br />
rst.MoveLast<br />
Text1.Text = rst.Fields(0).Value<br />
Text2.Text = rst.Fields(1).Value<br />
<br />
End Sub<br />
<br />
Private Sub cmdNext_Click()<br />
<br />
rst.MoveNext<br />
Text1.Text = rst.Fields(0).Value<br />
Text2.Text = rst.Fields(1).Value<br />
<br />
End Sub<br />
<br />
Private Sub cmdPrevious_Click()<br />
<br />
rst.MovePrevious<br />
Text1.Text = rst.Fields(0).Value<br />
Text2.Text = rst.Fields(1).Value<br />
<br />
End Sub
The code that you see above is do the following action:
1. Connect to Database, check if there is record in the database and show it in the text box.
2. Add the record in table.
3. Update the record in the table.
4. Delete record in the table.
5. Navigate through the record.
What I want is sample code to do the following action in VB.NET without using any Adapter control (SqlDbAdapter or OleDbDataAdapter, I need the code only).
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
|
hey guys... ive got this problem.. i dont know how simple this is but i just cant really get the value of my mfc dll returns to my vb app. everything works fine except when the data is of type BSTR.. i only get the first character of the string everytime i called the function in my vb app... i have this structure
struct udtAccessPointsInfo
{
BSTR sysIPAddress;
INT sysPortNumber;
BSTR sysAccessPointID;
BYTE sysStatus;
};
and a function that uses the struct....
LONG GetAccessPointsInfo([out, retval] udtAccessPointsInfo* pAccessPointsInfo)
inside the function i have this line of code for testing...
CString data = "1.1.1.200";
pAccessPointsInfo[0].sysIPAddress = data.AllocSysString();
when i tried to access the values of the struct in my vb app... i only get a string of value "1" which is the start of "1.1.1.200"... i really cant figure out what is really wrong... pls help me.. i think im really a mess with storing a CString to BSTR...
|
|
|
|
|
The code you posted is C#. You might want to try asking this question in the C# Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is this a VB6 or a VB.NET question?
Is the DLL a straight MFC DLL or a COM DLL with MFC support?
|
|
|
|
|
its a vb.net question...but later i will transfer the code to vb6.. can i get both the answers in 6 and .net? its a com dll with mfc support... thanks a lot....
|
|
|
|
|
I hope it can wait for morning. It's 1:00am here and I'll have to dig out some code samples but it's not very hard. I'll post here tomorrow?
You can email me as well to touch base.
mattisking@pobox.com
|
|
|
|
|
thanks a lot... i think i can still wait.. its 1 pm here.. so i still have time till night today to finish it.. thanks!!
|
|
|
|