|
I am trying to develop a win app where i am creating reports
I want to add/remove database/tables through coding.
So Anybody can help me Plz.
Ash R.
-- modified at 23:31 Thursday 23rd March, 2006
|
|
|
|
|
Yes you can do it, if you have Access at frontend and Access db at backend then you can run wizard to do so.
Regards
|
|
|
|
|
Hi Sajid. Thanks.
But Situation here is i have MYSQL as backend and vb.net as frontend.
And I want to add/remove database/tables from crystal reports at runtime
using vb.net coding.
Ash. R.
|
|
|
|
|
Hi,
I have a table with ID, col_name1, col_name2 and so on.
i am building a dataTable with ID
another datatable with all the columns that contains that id
now i am passing ID as a parameter in the second datalist and building a dataview. which gives me a block of data with just one specific ID. please refer to my code below:
-----------------------------
objConn = New SqlConnection(dbPath)
Try
'select the table with only distinct ID based
cmd = New SqlCommand("select distinct measure_id from measuredata m, textdata t where t.ScoreCardId = m.ScoreCardId", objConn)
Dim da As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim dtId As New DataTable("MeasureId")
da.Fill(dtId)
'select all columns with ID
Dim cmd1 As SqlCommand = New SqlCommand("select * from measureData", objConn)
Dim da1 As SqlDataAdapter = New SqlDataAdapter(cmd1)
Dim dt As New DataTable("MeasureSource")
da1.Fill(dt)
Dim myView As New DataView(dt)
Dim datarow As DataRow
Dim listitem As System.Web.UI.WebControls.ListItem
For Each datarow In dtId.Rows
myView.RowFilter = String.Format("Measure_Id='{0}'", datarow.Item("measure_Id"))
'######## checking if the dataview works #########
DataGrid1.DataSource = myView
DataGrid1.DataBind()
Next datarow
Catch ex As Exception
Response.Write("OOPs what went wrong:" + ex.ToString)
Finally
End Try
-----------------------------
now Datagrid1 is picking up only the block of record with last ID as it can only hold i set of data.
how can i programatically populate a chart inside that loop so that i can build a chart if there is data related to specific ID.
my aim is to generate a separate webchart for each ID in run time. do i need to declare those webchart control before i actually bind the data to it.
hope its not complex. I did post this question lots of time but i am not getting any response. is it too hard? I am happy to buy a third party software if could automate what i want to achieve.
many thanks again for all your help.
|
|
|
|
|
Hi all,
I want to have the drop down items from a main menustrip item appear in a
context menu. I must be missing something because the only way I can see to
do this is to manually duplicate the menu items in the contextmenustrip and
duplicate the code to handle the click event.
I have tried the Contextmenustrip.Items.AddRange(Toolstripmenuitem.Dropdownitems) but this seems to move the menu item to the context menu and crashes if there are more than 1 Toolstripmenuitem.Dropdownitems.
In VS 2003 you could merge a main menu items into a context menu, nice and
easy. Couldn't find any help searching the forums, surely I am not the only
one trying to do this?
Also, is it true that MS has not implemented visual inheritance for menustrips on forms? I can no longer add to/merge with the menu that appears on the ancestor on an inherited form!!
Any assistance greatly appreciated
Derek Chong
University Of Melbourne
Fire and Forest Simulations
|
|
|
|
|
I am using the following code to save an image into an MSAcess database using VB 2003
How can I resize the image to a fixed size? and two is there a cleaner way to do this
Dim STREAM As System.IO.FileStream
Dim READER As StreamReader
Dim JPEG_FILE As String
JPEG_FILE = txtPicFile.Text 'this is the path and file name of image
STREAM = New FileStream(JPEG_FILE, FileMode.Open, FileAccess.Read, FileShare.Read)
READER = New StreamReader(STREAM)
Dim FILEBYTE(STREAM.Length - 1) As Byte
STREAM.Read(FILEBYTE, 0, STREAM.Length)
'save image to database using DBS As DAO.Database and RST As DAO.Recordset...
.Fields("Image").Value = FILEBYTE
|
|
|
|
|
dim b as Bitmap = new Bitmap(txtPicFile.Text)
I'm pretty sure there's another constructor that takes a bitmap and a new size, which you can use to resize it. Then you can access the bits of the bitmap in whatever format you like to write to the database, they are exposed on the bitmap object.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
That looks pretty straightforward.
To resize an image you load the image into a Bitmap object, create a new Bitmap object with the size you want, and draw the first bitmap onto the new one scaled to that size. Save the image to a memorystream so that you easily can get it as a byte array.
---
b { font-weight: normal; }
|
|
|
|
|
That sound straight forward. How do I do that? I asume you use the
dim MyBitmap as bitmap ' creates the object
but how do I set the size?
|
|
|
|
|
New_Coder wrote: dim MyBitmap as bitmap ' creates the object
That only creates a reference to the object. When you create the object you specify the size:
MyBitmap = New BitMap(width, height)
---
b { font-weight: normal; }
-- modified at 13:39 Saturday 25th March, 2006
|
|
|
|
|
How do I get my image into the MyBitmap variable so I can save it back to the MSAccess database at a specific size?
Thanks for your help
|
|
|
|
|
hi , i need help.
i want create application get the number caller from line
phone
*i don't know information about port or com*
123
|
|
|
|
|
|
thank you for help. but i need sample code ...
i wait your help.
123
|
|
|
|
|
hi.
First you should have a modem that accept caller Id option. not all modems contain this option .
in general, Modem take a serial port, wich named COM1, COM2, COM3 and so on.
so you should manage the serial port to catch the phone number.
it will be done only by sending string commands to a serial port to enable caller Id option. if the modem retrun the string "OK" then it can enable it, and if it returns "ERROR" it's mean that your modem cannot enable Caller ID option .
to show you the code, please tell me first what version of vb you use. is it vb2005? or tell me wich version of .NET framework ?
I have a complete examples of using serial port. so I can help you.
waiting for your reply
OmarMallat
|
|
|
|
|
|
Hi there,
i am new in vb.net programming. I need a sortable multiline result list like it is used in ms desktop search. I've no idea to build it with an owner drawn listview. Can you help me? Are there some samples available?
Thanks for helping
|
|
|
|
|
I havn't looked for any examples but search CodeProject & MSDN for "OwnerDraw +ListBox". If you're new to VB.NET I'd strongly recommend getting "Programming microsoft Visual Basic .NET" by Francesco Balena.
It also has good examples on OwnerDrawn ListBoxes
Ed
|
|
|
|
|
First of all - thanks a lot for your answer.
To learn more about VB.NET programming I will buy your recommended book next week. I know i really need this stuff.
Also I've found a few samples of owner drawn listboxes or listviews in CodeProject and MSDN but they are not a solution for my problem. The result list of ms desktop search engine is a little bit more tricky: Between the multiline Items is a multiline textbox over all columns - that's what i need. I think this is a very nice solution if you don't want to use a webbrowser-control.
Sorry, if my question was not precise enough.
Gru
|
|
|
|
|
Can you provide a screenshot as I don't have and don't want to have MS Desktop Search
I think I understand what you means but it'd be nice to have a screenshot to work from.
Ed
|
|
|
|
|
Hi Ed,
thanks for your helping again.
I'm so sorry, but i don't be able to attach the file of the screenshot (.rtf or .bmp) in this reply.
So i will describe the structure of a hit in the hitlist:
first line = multi columns with fields like rank, title, author, date, path, filesize, type ...
second and third line = multiline text with the extract of the summary (over all columns)
forth line = filename (in the title column)
If you send me an eMail i will send you back the actual screenshot as attachment. Or is it possible to do this with an reply or mail in this forum?
Have a nice day
Gru
|
|
|
|
|
I'm sure this has been asked before, but I've heard that NO VB6 app will work on Vista, and M$ is more or less forceing businesses to migreate from VB6 to .NET
has anyone else heard this?
-== The PogoWolf ==-
http://www.pogowolf.com
GamersVue: ttp://GamersVue.blogger.com
|
|
|
|
|
That's not what I've heard.
http://www.devsource.com/article2/0,1895,1929552,00.asp[^]
However, I should also state that VB6 is on its last leg and is not getting much support from Microsoft. It'll be in your best interest to migrate your VB6 code to .NET or whatever your language of choice is.
|
|
|
|
|
hello, i want to know to make move a button from location (0,72) to (10, 30) from the code? how can i make it programatically!? thanks for your help!!
Adrian De Battista
|
|
|
|
|
You need to change the Button.Top and Button.Left properties.
|
|
|
|