|
Hi,
runtimes files on the target machine are required, you could distribute the required files by building a setup project (File > Add Project > Setup ...)
Right mouse on the Setup Project in the Solution explorer window > Add > Merge Module... > select Microsoft_VC80_DebugCRT_x86.msm
for more details plz go to http://msdn2.microsoft.com/en-us/library/ms225293(VS.80).aspx[^]
Good Luck ,
NajiCo
It's nice 2b important, but it's more important 2b nice...
|
|
|
|
|
thank you for taking interest in my problem.
if i add Microsoft_VC80_DebugCRT_x86.msm in the package then do i need to install runtime in the client machine..
thanx agian.
|
|
|
|
|
Nope, this Merge Module contains all that is required
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Thank You.
|
|
|
|
|
|
can i know how to save the time a card is scanned using vb.net.
example: a employee scan their id card and the system need to save time the card was scanned and save it in the database.
can it be done?
|
|
|
|
|
Depends, obviously the card reader can detect when a card is scanned. In this case you should be able to have a feild in your database that is set as a datetime and then simply update it with datetime.now when the card is scanned. You can find out how to do that in google.
|
|
|
|
|
|
Hi Friend..
I have one datagrid and in that i have taken one Template Column containing label control. I want to blink the text clot of that label. Can u help me out to do this task?
Gurudatta B. Shelke
|
|
|
|
|
Add a timer to your form and on Tick event add this code
LableName.Visible = Not LableName.Visible
Hope this helps.
Regards.
|
|
|
|
|
I'm currently working on a VB.NET project that requires several different types of items to be dragged on to a listview control (to put it very simply).
E.g. currently I have it running so I can drag a file from windows explorer on to the listview and a new listviewitem is created with the file name as the item text.
The problem I'm now encountering, is that I need to be able to drag treeview nodes from an existing old Visual Basic application (which has several treeviews), on to the listview in the new application. I have the source of the Visual Basic app so that can be modified if need be.
At the moment it's set up (not by me) so that items can be dragged between the various treeviews within the Visual Basic app, but I can't get it to recognise dragging *out* of that application on to the new one.
Any help would be greatly appreciated, let me know if you need more info...
|
|
|
|
|
The treeview may need to have the drag and drop enabled. From there you have to capture the events that fire when drag and drop occurs.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Why does the Child form always appear behind the other controls on the form?
|
|
|
|
|
Because the MDI CHild formis being rendered inside another control on the Parent form, called the MdiClient. Putting controls on the surface of an MDI Parent will always have them show up on top of this MdiClient control.
|
|
|
|
|
Hi,
I've been trying to work out how to iterate through a collection object using reflection.
I have a class with a few simple objects, strings, single[] arrays, and one collection.
However, when I'm using the GetFields() method to retrieve the objects in my class, when it gets to the collection I am unable to view all the items in the collection.
dim coll as collection = FieldInfoObj.getvalue(obj)
console.writeline("Collection has " & coll.count & " items in the collection")
for each item as object in coll
do_stuff(item)
next
Although it correctly states that I have 4 items in the collection, item 1 is Ok. item 2 is 'nothing' and item 3 causes an error. But I do actually have 4 'singles' in the collection.
How do i access the collection objects using reflection?
I *think* I need to reflect into each object seperately, and not just iterate through them after setting the main collection object using the getvalue(obj) method as I would with the other system.xxx type objects (which work fine)
Could anyone provide a simple example of how to iterate through a collection using reflection?
Thanks in advance,
Phil.
|
|
|
|
|
Hi,
I am calling a web services in VB.NET. The code is almost done but I am getting an error at shipping section that I don't know how to fix. I think it is very simple but I don't know how to figure it out.
Error is “Too many arguments to ‘Public Sub New()’ at value 1” at this line “Shipment.ShipmentItems = New ShipmentItem(1)”. I am not still sure that this is the right way of calling shipment class because shipment is a sub-class of salesorder.
----------------------------------------------------------------
Dim aToken As UsernameToken = New UsernameToken("test@abc.com", "test123", PasswordOption.SendPlainText)
mSalesOrderWse = New SalesOrderService
mSalesOrderWse.RequestSoapContext.Security.Timestamp.TtlInSeconds = 30
mSalesOrderWse.RequestSoapContext.Security.Tokens.Add(aToken)
Dim OrderRequest As New CheckComplianceOfSalesOrderRequest
OrderRequest.AddressOption = New SalesOrder.AddressOption
OrderRequest.AddressOption.IgnoreStreetLevelErrors = "True"
OrderRequest.AddressOption.RejectIfAddressSuggested = "True"
OrderRequest.PersistOption = PersistOption.Null
OrderRequest.SalesOrder = New SalesOrder.SalesOrder
OrderRequest.SalesOrder.BillTo = New SalesOrder.Address
OrderRequest.SalesOrder.BillTo.City = ocity
OrderRequest.SalesOrder.BillTo.Company = ocompany
OrderRequest.SalesOrder.BillTo.Country = ocountry
OrderRequest.SalesOrder.BillTo.County = ""
OrderRequest.SalesOrder.BillTo.Email = oemail
OrderRequest.SalesOrder.BillTo.Fax = ""
OrderRequest.SalesOrder.BillTo.FirstName = ofirstname
OrderRequest.SalesOrder.BillTo.LastName = olastname
OrderRequest.SalesOrder.BillTo.Phone = ophone
OrderRequest.SalesOrder.BillTo.State = ostate
OrderRequest.SalesOrder.BillTo.Street1 = oaddress
OrderRequest.SalesOrder.BillTo.Street2 = oaddress2
OrderRequest.SalesOrder.BillTo.Zip1 = opostcode
OrderRequest.SalesOrder.BillTo.Zip2 = ""
OrderRequest.SalesOrder.CustomerKey = custnmbr
OrderRequest.SalesOrder.FulfillmentType = FulfillmentType.Null
OrderRequest.SalesOrder.OrderType = OrderType.Internet
OrderRequest.SalesOrder.PurchaseDate = odate
OrderRequest.SalesOrder.SalesOrderKey = sopnumbe
Dim ShipmentItem2 As New ShipmentItem
ShipmentItem2.BrandKey = "SS_WINE"
ShipmentItem2.ProductKey = "04SSBOTELLA750"
ShipmentItem2.ProductQuantity = 1
ShipmentItem2.ProductUnitPrice = 20
Dim Shipment As New Shipment
Shipment.Freight = oshipcost
Shipment.LicenseRelationship = LicenseRelationship.SupplierToConsumer
Shipment.ShipDate = deliverydate
Shipment.ShipmentKey = "1"
Shipment.ShipmentStatus = ShipmentStatus.PaymentAccepted
Shipment.ShippingService = ShippingService.FXG
Shipment.InsuredAmount = 0
Shipment.GiftNote = ""
Shipment.SpecialInstructions = ocomment
Shipment.ShipTo = New Address
Shipment.ShipTo.Company = oshipcompany
Shipment.ShipTo.FirstName = oshipFName
Shipment.ShipTo.LastName = oshipLName
Shipment.ShipTo.City = oshiptown
Shipment.ShipTo.State = oshipstate
Shipment.ShipTo.Street1 = oshipaddress
Shipment.ShipTo.Street2 = oshipaddress2
Shipment.ShipTo.Country = oshipcountry
Shipment.ShipTo.Zip1 = oshipzip
Shipment.ShipTo.Zip2 = ""
Shipment.ShipTo.Fax = ""
Shipment.ShipTo.Phone = ship_phone
Shipment.ShipTo.Email = oemail
Shipment.ShipTo.County = ""
Shipment.ShipmentItems = New ShipmentItem(1)
Shipment.ShipmentItems(0) = ShipmentItem2
OrderRequest.SalesOrder.Shipments = New Shipment(1)
OrderRequest.SalesOrder.Shipments(0) = Shipment
OrderResponse = mSalesOrderWse.CheckComplianceOfSalesOrder(OrderRequest)
-----------------------------------------------
This secure class code was autometically generated.
_
Public Class SalesOrder
Public BillTo As Address
Public CustomerKey As String
Public FulfillmentType As FulfillmentType
Public OrderType As OrderType
Public PurchaseDate As Date
Public SalesOrderKey As String
Public Shipments() As Shipment
End Class
_
Public Class Address
Public City As String
Public Company As String
Public Country As String
Public County As String
Public DateOfBirth As Date
Public Email As String
Public Fax As String
Public FirstName As String
Public LastName As String
Public Phone As String
Public State As String
Public Street1 As String
Public Street2 As String
Public Zip1 As String
Public Zip2 As String
End Class
_
Public Class Shipment
Public Freight As Double
Public GiftNote As String
Public InsuredAmount As Double
Public LicenseRelationship As LicenseRelationship
Public Packages() As Package
Public ShipDate As Date
Public ShipmentItems() As ShipmentItem
Public ShipmentKey As String
Public ShipmentStatus As ShipmentStatus
Public ShippingService As ShippingService
Public ShipTo As Address
Public SpecialInstructions As String
End Class
_
Public Class ShipmentItem
Public BrandKey As String
Public ProductKey As String
Public ProductQuantity As Integer
Public ProductUnitPrice As Double
End Class
----------------------------------------------
Thanks,
Subrat Parida
Programmer
|
|
|
|
|
Subrat Parida wrote: Error is “Too many arguments to ‘Public Sub New()’ at value 1” at this line “Shipment.ShipmentItems = New ShipmentItem(1)”.
The error is telling you that your call to "New ShipmentItem" shouldn't have (1) on the end of it.
Whether or not you are using it correctly is for you to decide.
D.
-------------------------------------------
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Just bugger off and leave me alone!!
|
|
|
|
|
Thanks for looking at this issue.
If I remove (1) from 'New ShipmentItem(1)' and make the line like this
Shipment.ShipmentItems = New ShipmentItem
then this error is coming.
'SendOrdersToSC.SalesOrder.ShipmentItem' cannot be converted to '1-dimensional array of SendOrdersToSC.SalesOrder.ShipmentItem'
What I should do?
|
|
|
|
|
How about creating an array of ShipmentItems?
Dim shipItems() As ShipmentItems
Shipment.ShipmentItems = shipItems
|
|
|
|
|
Thank you.
This is fixed.
|
|
|
|
|
Hi
I have writing the followin function which catches a datagrid link button event, which should take the user id from the selected record and pass it into a stored procedure, and then refresh page, with the selected record deleted.
It all seems to work perfectly fine, but it jus doesn't delete for the some reason
I have also ran the procedure through a command window and that works as expected
here is my code for dealing with the button click and passing the parameter into the stored procedure
any help or spotting of my retarded mistake would be much appreciated
cheers
boyindie
Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As DataGridItemEventArgs) Handles dgPriv.ItemDataBound
Dim l As LinkButton
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
l = CType(e.Item.Cells(6).FindControl("cmdDel"), LinkButton)
l.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this item?');")
End If
End Sub
Sub dgpriv_ItemCommand(ByVal sender As Object, ByVal e As DataGridCommandEventArgs) Handles dgPriv.ItemCommand
Dim iid As Integer = dgPriv.DataKeys(e.Item.ItemIndex) 'Grab the ID from the hidden column
Dim litErr As New Literal
Dim myConnection As New MySqlConnection("Server=localhost; ;database=test;")
Try
Dim param As New MySqlParameter
Dim myDeleteCommand As MySqlCommand = New MySqlCommand("sp_mydelete", myConnection)
myDeleteCommand.CommandType = CommandType.StoredProcedure
param = myDeleteCommand.Parameters.Add("?p_id", MySqlDbType.VarChar)
param.Direction = ParameterDirection.Input
param.Value = iid
myConnection.Open() 'Open the connection
myDeleteCommand.ExecuteNonQuery() 'Delete the record
myConnection.Close() 'Close the connection
Catch ex As Exception
litErr.Text = ex.Message
MsgBox(ex.Message)
End Try
refresh()
End Sub
and this is my asp code
<asp:datagrid id="dgPriv" runat="server" BorderWidth="0"
CellPadding="4" Width="100%"
Font-Size="Smaller"
HeaderStyle-HorizontalAlign="Center"
HeaderStyle-Font-Bold="True"
datakeyfield ="userId"
HeaderStyle-BackColor="Navy"
HeaderStyle-ForeColor="White"
AlternatingItemStyle-BackColor="ActiveBorder" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False">
<Columns>
<asp:BoundColumn DataField ="userId" HeaderText="User ID"></asp:BoundColumn>
<asp:BoundColumn DataField ="username" HeaderText="User Name"></asp:BoundColumn>
<asp:BoundColumn DataField ="user_firstName" HeaderText="First Name"></asp:BoundColumn>
<asp:BoundColumn DataField ="user_lastname" HeaderText="Last Name"></asp:BoundColumn>
<asp:BoundColumn DataField ="groups" HeaderText="Privelages"></asp:BoundColumn>
<asp:BoundColumn DataField ="joinDate" HeaderText="Date Registered"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="Delete User">
<ItemTemplate >
<asp:linkbutton id="cmdDel" runat="server">Delete</asp:linkbutton>
</ItemTemplate></asp:TemplateColumn>
</Columns>
<PagerStyle HorizontalAlign="Left" />
<AlternatingItemStyle BackColor="ActiveBorder" />
<HeaderStyle BackColor="Navy" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
</asp:datagrid>
</div>
</form>
|
|
|
|
|
Your current code seems to be right, the only reason I can think of is you have done some silly mistake in your stored procedure. Did you debug the code? Does it get the iid value you want to delete?
If it gets through your myDeleteCommand.ExecuteNonQuery() line without any exception, it bound to be the stored procedure.
|
|
|
|
|
ah the joys of copy and pastin previous code and forgettin to change the database name to the one you want to use!
It was working fine it was jus using the procedure of the same name in the wrong database!
cheers for your help
|
|
|
|
|
I don't suppose you know how to bind data to a textbox
I have been trying to find a way of taking a value from a select statement and binding it to a textbox, should be so easy but can't find a method to do it!
|
|
|
|
|
My program needs to access and manipulate a table created by a third party vender. We want to catch when the table or tables are updated. When i set up the connection and set up the Adapter, I get a error when I try to access the tables saying that I don't have permissions. but some tables I can access. What do you suggest I do? Is there a query in Access I can do that updates every time a table or tables change? then I could access that query or have that query write to table that I can access. Keep in mind that I want to update the original table that I don't have access to.
Any ideas?
|
|
|
|