|
not shure about this but I'm currently creating a programme wich uses excel aswel and got alot of those errors because of language settings.
you can try the following:
'before creating any excel object
Dim oldCI As System.Globalization.CultureInfo = System.Threading.Thread.CurrentThread.CurrentCulture
System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("en-US")
'create the objects and do your code here
'after everything is done and you don't need to work with excel anymore
System.Threading.Thread.CurrentThread.CurrentCulture = oldCI
it fixed it for me so...
|
|
|
|
|
Is excel installed on the machine you are on?
|
|
|
|
|
The correct version is Set BootExcelApplication = CreateObject("Excel.Application") . Is Excel installed on your machine?
|
|
|
|
|
i want export datagridview data in excel sheet in vb.net winforms
|
|
|
|
|
|
hello everyone..
please help me about this.
I have an application that requires cv loader... For example, I have a resume (in any format, txt or doc file), then when I upload it using vb/asp apllication i need to get the name, address and contact number of the person that will be saved in an oracle database...
Is there someone who can give me some hint in creating this functionality
thanks in advance.
jyn
|
|
|
|
|
Please don't cross post. If your question isn't language specific, you should not post it in the language specific forums.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Below is the custom function I call to get data and fill it into a
DataTable. It seems to fail when the FILL command is called, but it
does not fail all the time. It appears to possibly be a length issue
but I am not sure and not sure how to resolve this... your help is
appreciated! Included is the stack trace information below the
function...thank you.
Public Function ExecuteQuery(ByVal strSQL As String, ByVal
myDataTable As DataTable) As Integer
Try
Timing_Start()
Dim myAdaptor As New OdbcDataAdapter(strSQL,
m_objConnection)
myDataTable.Rows.Clear()
'TODO: RUNTIME ERROR: when the SCRIPT column has the
umlaut character
myAdaptor.Fill(myDataTable)
Timing_Stop()
m_iFieldCount = myDataTable.Columns.Count
m_iRecordCount = myDataTable.Rows.Count
'Return (m_iRecordCount)
Return 0
Catch ex As Exception
Error_Show(ex, MsgBoxStyle.Exclamation)
Return (-1)
End Try
End Function
DESCRIPTION:
len
STACK TRACE:
at System.Runtime.InteropServices.Marshal.PtrToStringUni(IntPtr
ptr, Int32 len)
at System.Data.Odbc.OdbcDataReader.internalGetString(Int32 i)
at System.Data.Odbc.OdbcDataReader.GetValue(Int32 i, TypeMap
typemap)
at System.Data.Odbc.OdbcDataReader.GetValue(Int32 i)
at System.Data.Odbc.OdbcDataReader.GetValues(Object[] values)
at System.Data.Common.SchemaMapping.LoadDataRow(Boolean
clearDataValues, Boolean acceptChanges)
at System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping
mapping)
at System.Data.Common.DbDataAdapter.FillFromReader(Object data,
String srcTable, IDataReader dataReader, Int32 startRecord, Int32
maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable,
IDataReader dataReader)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data,
Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand
command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable,
IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at Expert_Services_Tools.clsConnection.ExecuteQuery(String strSQL,
DataTable myDataTable) in D:\My Documents\Visual Studio Projects
\Siebel Watcher\clsConnection.vb:line 324
SOURCE: PtrToStringUni
John Wadleigh
Siebel Expert
|
|
|
|
|
Whats the error message, does it give you any more info.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It shows the following error message - details were in my first posting. The error occurs on the call to myAdaptor.Fill(myDataTable) but not all the time - only happens when it seems one of the columns returned has a length of characters longer than what might be supported. But I am not sure where this is defined and why I cannot get the data. It appears the problematic column is defined as a 'LONG' database column type so it can have a lot of data in it.
An unhandled exception of type 'System.ArgumentException' occurred in system.data.dll
Additional information: len
John Wadleigh
Siebel Expert
|
|
|
|
|
Why are you using the Odbc providers?? Which database are you using??
|
|
|
|
|
It is a SQL Anywhere database. It's a local database file mostly, but eventually I would like to also access Oracle database. However my company mostly deals with these 2 gig local file databases that are SQL Anywhere. So I figured ODBC is the easiest for me and my colleagues to use and setup - that is what we mostly use.
Is there another and perhaps better way?
Thanks.
John Wadleigh
Siebel Expert
|
|
|
|
|
Well, ODBC is the "generic" data provider. There's no performance benefits to using it and the types it uses aren't exactly matched to the types specific to each database implentation. OleDb is the better "generic" provider, while the best to use is the providers for the specific database you're using.
In your case, I would highly recommend using SyBase's .NET data provider for the best compatibility and performance. I think it's found here[^].
The same is true for Oracle.
|
|
|
|
|
I recall trying to make a decision between OleDb and ODBC and for some reason went with ODBC. I went to the Sybase website and searched for .NET developer stuff but only came up with Sybase SQL Anywhere Developer Edition, which I am downloading but not sure if this is what I need.
Here is my problem again but nicely simplified - the error happens on the FILL command...
Dim conn As New Odbc.OdbcConnection("DSN=" & "client_x" & ";UID=" & "SIEBEL" & ";PWD=" & "NEED2CHANGE" & ";")
Dim dr As Odbc.OdbcDataReader
Dim strSQL As String = "select b.name, b.row_id, b.inactive_flg, b.script from SIEBEL.S_APPL_WEBSCRPT b where b.row_id = '1-K3E-1IYQ'"
Dim dt As DataTable
Dim vals() As String
Dim myAdaptor As New Odbc.OdbcDataAdapter(strSQL, conn)
'dt.Rows.Clear()
myAdaptor.Fill(dt)
thanks!
John Wadleigh
Siebel Expert
|
|
|
|
|
sir i make paint brush in vb.net. so i use an array which save dimension of draw ex(line, rectangle, ellipse, brush,eraser etc). so when this array cross size of 510 then my pc works slowly. so i want to use catch memory plz help me for using cache memory.
thanks
Vineet Swami
Isol
|
|
|
|
|
Don't Repost.
Sathesh.
Blessed is the season which engages the whole world in a conspiracy of love.
|
|
|
|
|
510 and what??
Look - the processor cache is off limits to you. You have no control over it and it is an exceedingly rare case that you ever need to go to that depth to improve performance and certainly not in a paint application.
This will not solve your problem. If you're having performance issues with your application, review the design or your app and it's code to look for better techniques of doing what you are and optimize the code as much as possible.
What you've described about your code, or more to the point, the lack of description, there's nothing we can say to help you.
|
|
|
|
|
I am using VB.NET.
I am new to web services, and have been given the instruction that I am to send an XML document via HTTPS POST and receive a response XML document. The web service address I have been given has no ASMX file, WSDL file or DISCO, so from what I can gather I cannot use dot.NET's built in web service controls. The address I have been given to post these calls to, is in is the following format:
https://www.server.com/WebService
(I have replaced the real server name)
I swear I have read the entire internet on the topic.
I have a couple of questions
1) can it be done with a web service address formatted such as the above (no ASMX WSDL)?? (I presume it must)
2) Are any of the approaches I have attempted below valid / should work?
3) I keep receiving an error "unable to connect to the remote server", are my issues all their fault? (I doubt it) and if not, what am I doing wrong? How can I do this?
Approaches I have tried include:
(don't get too caught up with the fact some are incomplete or some of the data or calls look silly, I'm really trying to illustrate the techniques that have failed)
Dim oRequest As HttpWebRequest = WebRequest.Create("https://www.server.com/WebService")
Dim oStream As Stream = oRequest.GetRequestStream
Dim oXML As Xml.XmlTextWriter = New Xml.XmlTextWriter(oStream, Encoding.GetEncoding("UTF-8"))
address = New Uri("https://www.server.com/WebService")
request = DirectCast(WebRequest.Create(address), HttpWebRequest)
request.Method = "POST"
request.ContentType = "application/x-www-form-urlencoded"
<WebServiceBinding("SomeBindingName", "SomeBindingNS")> _
Public Class CustomProxy
Inherits SoapHttpClientProtocol
<SoapRpcMethod(Action:="urn:AstroIntf-IAstro#GetSunriseInfo", RequestNamespace:="run:AstroIntf-IAstro")> _
Public Function GetSunriseInfo(ByVal Latitude As Double, ByVal Longitude As Double, _
ByVal Year As Integer, ByVal Month As Integer, ByVal Day As Integer, _
ByVal TimeBiasMinutes As Integer) As String
Me.Url = "https://www.server.com/WebService"
Dim ret() As Object
ret = Me.Invoke("GetSunriseInfo", _
New Object() _
{Latitude, Longitude, Year, Month, Day, TimeBiasMinutes})
Return CType(ret(0), String)
End Function
End Class
Dim oClient As New WebClient
Dim oStream As Stream = oClient.OpenWrite("https://www.server.com/WebService", "POST")
Dim oWriter As StreamWriter = New StreamWriter(oStream)
oWriter.WriteLine("Hello world")
oWriter.Close()
and good old fashioned html:
<form target="_blank" action='http://www.server.com/WebService' method="POST">
<table>
<tr>
<td>Enter something:</td>
<td><input type="text" size="30" name="test1" /></td>
</tr>
<tr>
<td></td>
<td align="right"> <input type="submit" value="Submit" /></td>
</tr>
</table>
</form>
|
|
|
|
|
I have a problem regarding my tcplistener. I went to MSDN to get the example for tcplistener and found out that it listen to character by character which is not wat i wan. Is that a way whereby i am able to read the client request as a sentence and not character??
|
|
|
|
|
The TcpListener object merely listens for connection requests. When a connection request comes in, you can either use that as a trigger (Which I have done for some purposes), or you can issue an AcceptTcpClient to create a TcpClient object for transmitting information back and forth.
Additionally, the TcpListener object does not have events and you "should" have it configured as a listener thread that simply loops and checks for connection requests.
I don't claim to be a know it all, for I know that I am not...
I usually have an answer though.
|
|
|
|
|
I am trying to limit the length of text that a user can enter into a text field in a propertygrid. I really prefer not to have to add a form with a textbox and a button to accomplish something that should be so simple. On an ordinary textbox, you can easily set this, but not when it is in a propertygrid. I have spent several days searching for ways to do this, but have been unsuccessful. I tried to add a class that inherits from a textbox and set it that way, but when I run the application, I can not type anything in the field.
Thank you for your time (and hopefully willingness to help)
Nick
|
|
|
|
|
I've only used the property grid a couple times. I created a class with exposed properties and set the propertygrid.selectedobject = to the class.
In the property's description (displayed at the bottom of the property grid), could state "The length should be between x and xx amount of characters". In the property set statement, you can then check the length prior to setting your variable = value and display a messagebox if the length is outside your required range.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
How do i specify path to a file on another computer on the network
thanks
|
|
|
|
|
you have 2 ways:
\\terminal id\folder/share name
\\ip address\folder/share name
you obviously need security to do the above...
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|