Click here to Skip to main content
16,004,854 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralControl For Crystal in VB.Net As VB Pin
Meenge27-Dec-07 20:15
Meenge27-Dec-07 20:15 
GeneralRe: Control For Crystal in VB.Net As VB Pin
Paul Conrad30-Dec-07 10:43
professionalPaul Conrad30-Dec-07 10:43 
QuestionDataGrid Column Identification Assistance w/Buttons using the SelectedIndexChange Event Pin
dhbaer27-Dec-07 7:53
dhbaer27-Dec-07 7:53 
GeneralArabic language Pin
hassanasp27-Dec-07 6:37
hassanasp27-Dec-07 6:37 
GeneralRe: Arabic language Pin
Paul Conrad27-Dec-07 15:03
professionalPaul Conrad27-Dec-07 15:03 
GeneralRe: Arabic language Pin
hassanasp28-Dec-07 11:07
hassanasp28-Dec-07 11:07 
GeneralRe: Arabic language Pin
nishkarsh_k28-Dec-07 6:51
nishkarsh_k28-Dec-07 6:51 
AnswerRe: Arabic language Pin
Shimmy Weitzhandler29-Dec-07 7:59
Shimmy Weitzhandler29-Dec-07 7:59 
AnswerRe: Arabic language Pin
Shimmy Weitzhandler29-Dec-07 8:01
Shimmy Weitzhandler29-Dec-07 8:01 
GeneralRe: Arabic language thanks Pin
hassanasp31-Dec-07 12:42
hassanasp31-Dec-07 12:42 
QuestionDataGridView = AcceptChanges, Details = ? Pin
tellytub27-Dec-07 3:12
tellytub27-Dec-07 3:12 
AnswerRe: DataGridView = AcceptChanges, Details = ? Pin
John_Adams27-Dec-07 4:37
John_Adams27-Dec-07 4:37 
GeneralRe: DataGridView = AcceptChanges, Details = ? Pin
tellytub28-Dec-07 18:34
tellytub28-Dec-07 18:34 
QuestionGrid and combo box issue redefined [modified] Pin
nishkarsh_k27-Dec-07 0:20
nishkarsh_k27-Dec-07 0:20 
GeneralRe: Grid and combo box issue redefined Pin
darkelv27-Dec-07 1:07
darkelv27-Dec-07 1:07 
GeneralRe: Grid and combo box issue redefined Pin
helelark12327-Dec-07 1:16
helelark12327-Dec-07 1:16 
GeneralRe: Grid and combo box issue redefined Pin
BOREC27-Dec-07 1:16
BOREC27-Dec-07 1:16 
Generaldatagridviewcomboboxcolumn selectionbackcolor Pin
helelark12327-Dec-07 0:01
helelark12327-Dec-07 0:01 
GeneralRe: datagridviewcomboboxcolumn selectionbackcolor Pin
KaptinKrunch28-Dec-07 6:41
KaptinKrunch28-Dec-07 6:41 
GeneralRe: datagridviewcomboboxcolumn selectionbackcolor Pin
helelark12328-Dec-07 21:42
helelark12328-Dec-07 21:42 
Generalgenerating a report in .net Pin
sreenivi26-Dec-07 23:50
sreenivi26-Dec-07 23:50 
GeneralRe: generating a report in .net Pin
Paul Conrad30-Dec-07 10:42
professionalPaul Conrad30-Dec-07 10:42 
QuestionHow to import data by character wise from excel to sql server Pin
kamarudeen26-Dec-07 23:03
kamarudeen26-Dec-07 23:03 
Hi,
I hav a code for import data from excel to sql server. This code used to import data totally. That is, already some data in excel imported the whole data to sql server.The code is,


Dim excelConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Book1.xls;Extended Properties=""Excel 8.0;HDR=YES;"""


Dim connection As OleDbConnection = New OleDbConnection(excelConnectionString)
Try
Dim command As OleDbCommand = New OleDbCommand("Select ID,Data FROM [Sheet1$]", connection)
connection.Open()
Dim dr As OleDbDataReader = command.ExecuteReader
Try
Dim sqlConnectionString As String
'= WebConfigurationManager.ConnectionStrings("CampaignEnterpriseConnectionString").ConnectionString
sqlConnectionString = "Data Source=rafik-vzi7iicz1\sa;Initial Catalog=Excel;Integrated Security=True"
Dim con As SqlConnection
con = New SqlConnection(sqlConnectionString)
Dim bulkCopy As SqlBulkCopy = New SqlBulkCopy(sqlConnectionString)
Try
bulkCopy.DestinationTableName = "Exceldata"
bulkCopy.WriteToServer(dr)
Finally
CType(bulkCopy, IDisposable).Dispose()
End Try
Finally
CType(dr, IDisposable).Dispose()
End Try
Catch ex As Exception
Finally
CType(connection, IDisposable).Dispose()
End Try
MsgBox("imported successfully", MsgBoxStyle.Information)

The code is working perfectly.

My problem is, i need to import the data by character wise. That is, suppose i typing some word in excel, the word automatically saved in sql server by character wise.

Any idea Plz tell me.
Suggestions also appreciate.
Plz help me.
AnswerRe: How to import data by character wise from excel to sql server Pin
Dave Kreskowiak27-Dec-07 12:46
mveDave Kreskowiak27-Dec-07 12:46 
GeneralRe: How to import data by character wise from excel to sql server Pin
kamarudeen27-Dec-07 18:29
kamarudeen27-Dec-07 18:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.