|
hello frnd,
i have a Excel file with data and i want to import that excel file in MSSqlServer using vb6.0,
how can i do that....please help
if any one have code then please give me...
any helpful link ????
thankx in advance
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
hi,
These is the routine I am using. It works fine..
I move the each cells to an specific field (str... = string or int... =
integer) and I use the fields to update the data base.
I hope it helps you
===================================================================================
Option Explicit
Dim xl As New Excel.Application
Dim xlw As Excel.Workbook
Private Sub Excel name_KeyPress(KeyAscii As Integer) ' the combo-box
has
the Excel name
If KeyAscii = 13 Then
Set xlw = xl.Workbooks.Open("C:\List\Excel\" _
& Excel name)
xlw.Sheets("Plan1").Select
' start in the second row because the first one it is the head
x = 2 '(Row)
Do While xlw.Application.Cells(x, 1).Value <> ""
strTratamento = xlw.Application.Cells(x, 1).Value
strNomeConvidado = xlw.Application.Cells(x, 2).Value
intQtde = xlw.Application.Cells(x,3).Value
strName01 = xlw.Application.Cells(x, 4).Value
strName02 = xlw.Application.Cells(x, 5).Value
strName03 = xlw.Application.Cells(x, 6).Value
strName04 = xlw.Application.Cells(x, 7).Value
strName05 = xlw.Application.Cells(x, 8).Value
strName06 = xlw.Application.Cells(x, 9).Value
strName07 = xlw.Application.Cells(x, 10).Value
strName08 = xlw.Application.Cells(x, 11).Value
intDDD01 = xlw.Application.Cells(x, 12).Value
strTelefone01 = xlw.Application.Cells(x, 13).Value
intDDD02 = xlw.Application.Cells(x, 14).Value
strTelefone02 = xlw.Application.Cells(x, 15).Value
intDDD03 = xlw.Application.Cells(x, 16).Value
strTelefone03 = xlw.Application.Cells(x, 17).Value
strOrign = xlw.Application.Cells(x, 18).Value
strObservers = xlw.Application.Cells(x, 19).Value
' Include here the routine to update the SQL Server data base
x = x + 1
Loop
xlw.Close False
Set xlw = Nothing
Set xl = Nothing
subLiberaForm
Screen.MousePointer = vbDefault
End If
End If
End Sub
Regards
IPS
|
|
|
|
|
hi my friends
my english is weak, so i use simple sentences
I emergency need some code of vb.net
i want to find my harddisk serial number
i want to find my mainboard serial number
i want to find my cpu serial number
serial number or id , not difrent.
if u have
please insert them here
or send to me Golab_omidreza@yahoo.com
thanks
|
|
|
|
|
Hi All,
I had developed a Vb.Net windows based application using VS2005 and it was also released to the client. Now the client wants the application to support any number of languages (French, German, e.t.c). I know that we can use their respective cultures to accomplish this. But we never know how many languages the developed application should support. So, I thought of preparing a configuration form by placing the english text in the labels and ask the client to enter their respective language equivalent words in the text fields provided in the configuration screen. I understand that I have to provide a numerous number of text fields so that the client can configure his language equivalent words for all the label captions in the project. I shall store this in a DB(MS Access) or in an XML file. During the startup on the selection of a particular language, my appliction will read the values from the XML or DB and show the respective language equivalent words in all the labels.
Is this the optimal way to do this? Or is there any better way than this? Remember the application should support any number of languages and the client should be abel to change the language equivalent words according to this wish.
Hope u guys can help me out as I have to get in to this soon.
Thanks & Regards,
Hari.
Hari Prasad...
|
|
|
|
|
from what I understand you'r way is the best/only way to accomplish this.
vb.net has te option to define several words to a label (different language) but this can (to my knowledge) only been done at design time. so if you wanted to use this you yourself would have to give in every word in every language yourself (probably not something you'd want)
so I would do it the same as you proposed but be very carful that it doesn't slow down you're program to much
|
|
|
|
|
Hello,
In my vb.net application,i created one report using crystal report.
In report header section i have placed four textboxes in which data must appeared from calling form's text boxes.But its not showing up the report header section.Againg how could i connect my report to database particularly a DSN at run time.
Please give some code.
Thanks.
|
|
|
|
|
Hello,
Maybe my last post was too confusing. Here's my problem, I have a vb.net app running on my computer that is listening for incoming connections on IP address 127.0.0.1 port 87 and whenever I attempt to connect to my vb.net app via a php page using php's built in socket support, it is never able to connect and send any data like a simple "hello". I hope this understandable. I'm just trying to send data from an internet webpage to a program. If there are any other ways to do this please let me know. Thank you, Caleb
|
|
|
|
|
Listen on the local IP rather then the loopback IP.
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
i am doing a project to enter data to a text file and save it.(a single line of data on a daily basis) this i can do, but the only problem i have is when you append the textfile the data entered goes to the next line down. how do i get it to reverse, go above the last line.
Regards
Zeldacat
|
|
|
|
|
You can't append at the beginning of the file. You have to read all the data, add the text to the beginning of it, and write all the data.
-- modified at 12:28 Saturday 7th July, 2007
When I come to think of it, why do you need the last lines at the top of the file anyway? If you want them displayed in that way, you can easily reverse the order when displaying them.
---
single minded; short sighted; long gone;
|
|
|
|
|
If after a couple of weeks/years/whatever you run out of buffer space to
prefix the new data to existing data, then read this article.[^]
|
|
|
|
|
I have an Access data table configured to accept null values. I have a table adapter that allows null values. When I try to INSERT a null value into a field, I get a type conversion error. It doesn't matter whether the type of the field is string or numeric.
This test will give the error:
tableAdapter.Insert(DBNull.Value,...)
It would be best to allow null values in the table, and not have to convert to empty strings and zeroes.
|
|
|
|
|
Have you figured it out or is it still a problem?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi there,
Is there a way to determine if windows are shutting down in a VB application?
Thanks, Werries
A programmer's life is good... or is it?? Ek dink nie so nie!
|
|
|
|
|
i believe windows executes a batch file to initialise shutdown sequence, perhaps you could use the filewatcher to monitor this file for changes, then if something happens with it, check if the shutdown process in is started through system.diagnostics.process.
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
Have a look at SystemEvents class.
|
|
|
|
|
hi
you can use ghedit.msc and scrip to determine when windows are shutting down.
goto :
Run -> gpedit.msc -> computer configuration -> windows setting -> scripts ->shutdown.
and then add your vb script that you want to run at shutdown.
|
|
|
|
|
Hi everybody
the situation is that an application contains many richtextbox objects and user enters rich text data in them which is stored into sql database (contants from rt1.rtf).
Now my task is to display that data into a crystal report. when i drag this field (type of this field is text) onto the report it displays all rtf header information as well instead of formating the actual data
Please give me any suggestion you have about it
Regards
Salman Sheikh
|
|
|
|
|
Hi,
I've managed to connect to an Informix database to display the contents of a specific table in a DataGridView.
What I am struggling with is getting the table and fields names from the database, and putting the information into a TreeView so that the user can select the table in the tree, and update the grid with that selected table - but I can't seem to get it to collect the schema information.
Ideally, I'd like to have the first node on the tree as the database name, followed by nodes for the table name, and then nodes for the field names.
Could anybody point me in the right direction?
|
|
|
|
|
Hi
I'm busy with an app that interfaces with the Parallel Port.
I want to create a graphic sort of display on my form that looks similar to the actual layout of the DB-25 connector.
I thought of using Radio Button to either display the input condition, or to toggle the condition of the outputs (Data Pins)
Is there a way to make these buttons independent of each other (i.e. so that clicking one of them does not turn the others off)
I though I may be able able to use something like e.handled in the 'Click Event', to prevent the others from tuning off when I click one of them, but no such luck.
Basically I want to be able to set or clear any combination of these buttons for the output pins, and also control the appearance of them depending on the port's input conditions.
Any other way I can do this? I could use panels, and toggle the pin and the color when clicked, but don't like the rectangles.
|
|
|
|
|
RadioButtons work together, unless you put them in different Containers;
keeping them apart is the primary purpose of the GroupBox.
|
|
|
|
|
Hi
Yep I get that, what I'm asking is:
If I can do something to make them independent
OR
What else can I use that will look SIMILAR...
|
|
|
|
|
if you have two radiobuttons rb1 and rb2 both on panel0,
you could create two more panels (panel1 and panel2), put rb1 on panel1,
put rb2 on panel2, put both panel1 and panel2 on panel0, and arrange it
such that it looks exactly as before.
rb1 and rb2 now should word independently (you better have more RadioButtons then!)
|
|
|
|
|
Hi Luc
That makes them independent... But you cannot toggle them anymore since there is now only one.
Basically I want it to LOOK like a Radio Button, and FUNCTION like a check box
|
|
|
|
|
Set AutoCheck to false and implement a click handler to toggle the checked status.
I'm largely language agnostic
After a while they all bug me
|
|
|
|