|
Is this becoming a big problem? I got into it with a poster on another site for something similar. They wanted someone to code their project for them and they offered to pay. The only outcome here is that this person will graduate and not know anything and get a job by lying then be someone's inept co-worker.
Cleako
|
|
|
|
|
I have an app i am working on that reads a .csv file to validate it.
here is the connection styring i am using to upload it:
Dim conn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & pather & ";Extended Properties=""text; HDR=No; FMT=Delimited; IMEX=1\"""
The problem i am having is that i do NOT want the first row to be counted as a header, I even have it specified in the string, but without fail, it always loads the first row as one.
It is driving me nuts, am i missing something?
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
Well, using your code and my test file, I don't have that problem. But, you might want to clean up your connection string a little bit the part with the IMEX value is malformed.
Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\;" & _
"Extended Properties=""text;HDR=No;FMT=Delimited;IMEX=1"";"
Dim conn As New OleDbCommection(connString)
Dim comm As New OleDbCommand("Select * From TestData.csv", conn)
conn.Open()
Dim dr As OleDbDataReader = comm.ExecuteReader()
If dr.HasRows Then
Do While dr.Read()
Debug.WriteLine(String.Format("{0} - {1}", dr.GetValue(0).ToString(), dr.GetValue(1).ToString())
Loop
End If
conn.Close()
Are you doing something in your reading that is skipping the first row?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Not that i am aware of. here is how i am using it:
<br />
Private Sub btnUpload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpload.Click<br />
<br />
Dim conn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _<br />
Session("pather") & _<br />
";Extended Properties=""text;HDR=No;FMT=Delimited;IMEX=1"";"<br />
<br />
<br />
If f = ".csv" Then<br />
xl = "SELECT * FROM " & filer<br />
Fill(xl, conn)<br />
End If<br />
End Sub<br />
<br />
Private Sub Fill(ByVal xl As String, ByVal con As String)<br />
<br />
Dim com As New OleDbDataAdapter(xl, con)<br />
Dim ds As New DataSet<br />
<br />
com.Fill(ds)<br />
com.Dispose() <br />
<br />
Me.DataGrid2.DataSource = ds<br />
Me.DataGrid2.DataBind()<br />
End Sub<br />
<br />
all i am doing at this point is grabbing the data in the .csv file and populating a dataset with it. No matter what i do, however, it keeps using that first row as a header, even with the cleaner connection string.
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
I tried it with this and found no problems:
Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\;" & _
"Extended Properties=""text;HDR=No;FMT=Delimited;IMEX=1"";"
Dim conn As New OleDbCommection(connString)
Dim da As New OleDbDataAdapter("Select * From TestData.csv", conn)
Dim ds As New DataSet
da.Fill(ds)
conn.Close()
conn.Dispose()
DataGridView1.DataSource = ds.Tables(0)
The DataGridView control replaces the DataGrid in 2002/2003. Since it can only display a single table at a time, you must specify which table in the dataset to bind to.
What's in the first 10 rows of this .CSV file? Could the data in the file be misinterpreted by the ISAM driver?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
the .csv files are pretty big, they have 39 columns with values ranging from decimals, to text, to ints and datetimes. I suppose that the driver may be having an issue with the sheer volume of information being selected.
The real pain in the butt is that if the users were being required to include the header field, none of this would be a problem.
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
I'll be damned if I can figure out what's causing it. I can get it to do everything perfectly, even tell it to use the first row as column headers, thereby duplicating your problem. I'd need a sample of the data to test it any further, only about the first 10 rows...
By any chance, have you installed the lastest MDAC[^]?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I can't for the life of me figure out why the hell it wasnt working. The syntax appeared correct....
Thanks for all of your help with this, i really appreciate it.
Want to hear the real kick in the cajones?
After 2 days of beating my head against the wall on this, I found out that i was trying to rewrite a function that had already been built and worked.... I was supposed to be tweaking the existing code, not writing a new page.
So, I ended up using code that had been previously written and worked.
At least we have along weekend to recover
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
I am a VB.NET learner and experienced in VB6.
I want to make a real life application/project using VB.NET application or database application using VB.NET as front end and SQL/Oracle as a database that should be different from general VB6 project and here I want to apply the extra features of VB.NET that is notavaible in VB6.
can u suggest me some good topics
I want to make something new/diffrent
so plz help me
|
|
|
|
|
I have to transfer some data from a public pc on to server.
I have tried using MSMQ but the problem is that we have to configuure firewall to allow messages to reach server.
How can i transfer data from client system through internet on to server without any configuration to server. (This is a Win application)
If i am not clear let me know.
|
|
|
|
|
That depends on the server type your trying to connect to and what ports the firewall will let through. Without knowning that, you're groping around in the dark.
Are you trying to connect to an FTP server? Upload a file to a web server? What kind of server is this?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Now i am using Web Services as http is allowed through firewall
|
|
|
|
|
Hi Buddy,
I want to do the same job in C#.Net [Winform to Web Forms]. I have no idea how i do this. Please if you please send me the example of it. I will be very thankful to you.
Yours Sincerely,
Muhammad Waqas Butt
waqasb4all@yahoo.com
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.waqasbutt.freewebspace.com
|
|
|
|
|
Create a simple function in the web service which do the data transfer either through dataset or xml files or any other medium. Then add refference of that web service to your project.
Remember: If WS is on a server then you have to pass the name like this "http://ServerIP/Service.asmx.
That it.
|
|
|
|
|
Hi all,
I have an application that has an OCX embedded and it writes a log during the session. From time to time I receive a "Runtime error 70" that is a permision denied error but I check the log file and it has the correct user access. The only concurrent access is just for reading from a different process but I don't write the file so it wouldn't be the problem.
As it's in a customer machine I can't debug it as it's in a remote machine.
Any idea or suggestion about what it could be?
Thanks in advance,
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Are you trying to read the file while it is being written to? Although this should generate an Access Deined exception, not Permission Denied.
Are you using MTS?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
There's no MTS either concurrent access.
Any other option?
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I have no idea. There are hundreds of things that could generate a Permission Denied message.
Since we have no idea what your code is doing or expecting or assuming, there's just no way to tell you what's wrong.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
:(hi,
I m making application in that application i have to make label and resizing and moving it in panel at runtime.I want to moving and resizing it by mouse or keyboard also. Means whenever user want to resize it by keyboard then it will be resizing by keyboard.Also I want to give minimum height and width of the label. Plz give me solution for that
|
|
|
|
|
Hi
As long as I don't think that label control does not get focus, it cannot support keyboard events.
But in the case of dragging and resizing it using mouse, you can use its mouse_down, mouse_move and mouse_up events to perform the move and resize programatically.
If you do need to have the keyboard moving enabled, you can use a textbox control, have its properties set so that it looks like a label. And you can now have the keyboard events raised for that.
|
|
|
|
|
Dear all,
Anybody know how to change the database file inside the crystal report at the VB.NET runtime?
Because of my application database is base on each project have their own database name. That's why I need the crystal report to generate the current database file.
|
|
|
|
|
I think its something along the lines of:
Dim crtableLogoninfo As New TableLogOnInfo
Dim crConnectionInfo As New ConnectionInfo
Dim CrTables As Tables
Dim CrTable As Table
' Set the connectioninfo
With crConnectionInfo
.ServerName = "(local)"
.DatabaseName = "pubs"
.UserID = "sa"
.Password = "asdasd"
End With
CrTables = crReportDocument.Database.Tables
' Apply the connectioninfo to each table in the report
For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
I'm not sure if this is exact, but its pretty close to. I had the same problem with different customers with different servers/databases/login details. Took me awhile to solve.
|
|
|
|
|
Clear and basic difference between .dll and .exe file?
When the .dll and exe files are created?
Anybody know the answer send me.
aruljothi
|
|
|
|
|
In most fundamental terms, a DLL does not have it's own execution context. You cannot "run" a DLL. In order to run code in a DLL it must be loaded by an exe. DLLs are often created to allow reuse of general code, although this is not a requirement. A developer may create DLLs that are only intended for use by a single application, because a DLL allows more modular organization of code, and a DLL may be upgraded without having to redistribute a new version of an application.
DLLs are not typically form oriented. An occasional DLL may display a dialog, but most DLLs contain primarily classes with few or no forms.
For example, the NET framework is primarily composed of DLLs.
In general, a well designed application that is any larger than "small" in terms of size and complexity will consist of an EXE that provides the forms and user interface, but all business logic and real guts of the application will be organized into a logical class structure provided by DLLs.
|
|
|
|
|
The following error message is being displayed when i first started my asp.net application. So kinly help me with the solution.
"Error while trying to run project.Unable to start debugging webserver.The server doesnot support debugging of asp.net or ATL server application.Run setup to install the visual studio.net server components. If set up has been run verify that the valid url has been specified.
U may also want to refer the asp.net and ATL server debugging topic in the online documentation. Would u like to disable future attempts to debug asp.net projects for this projects."
aruljothi
|
|
|
|