Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #25.0K
Ranked #2K
~2K People Reached
Favorite Forums
Favorite Tags

7 Posted Topics

Member Avatar for aishapot

[QUOTE=aishapot;1642779]I put it in a module. Imports System.Data.SqlClient Module Module1 Public sqlconn As New SqlConnection Public sqlcmd As New SqlCommand [B]Public sqldr As SqlDataReader[/B] Public strsql As String [B]Public sqlda As SqlDataAdapter[/B] Sub connect() If sqlconn.State = ConnectionState.Open Then sqlconn.Close() sqlconn.ConnectionString = "data source=.\sqlexpress; integrated security=true; attachdbfilename=|datadirectory|\TESTING.mdf; user instance=true;" sqlconn.Open() …

Member Avatar for neeturathi
0
400
Member Avatar for jonoman

Hey, you could use something like this: [CODE]Dim path as string = "C:\Users\profile.DOMAIN" Dim Str as string() = path.substring(path.lastidexof("\")+1).split(".")[/CODE] with that you get Str with 2 values, the first one Str(0) should be profile, the second one Str(1) DOMAIN, now just use them as you please.

Member Avatar for Reverend Jim
0
182
Member Avatar for Ehtesham Siddiq

Hi. Here are some alternate steps on how you can do it. 1. databind your datagridview in design mode 2. edit the desired column to make it a combobox column and add the items 3. then on the formload you can try this code : [CODE]Dim ds as new Dataset …

Member Avatar for Ehtesham Siddiq
0
252
Member Avatar for Ehtesham Siddiq

You can get the value without the extra white spaces with the .trim method. [CODE]Dim Str as String() = Datagridview.Item(0,0).Value.ToString.Trim.Split(" ") [/CODE] Now you should have an array with 3 positions if the value has name, surname and last name. Also you can check the length of the resulting array …

Member Avatar for Zeth643
0
884
Member Avatar for mikejs

Pgmer already gave you the answer for your problem. Where you are doing this : [CODE] Private Sub ComboBoxSearchExist_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBoxSearchExist.SelectedIndexChanged bindingSource1.DataSource = Nothing bindingSource1.DataSource.Clear() End Sub[/CODE] you are just clearing the binding source, but not rebinding the datagridview to the cleared binding …

Member Avatar for Zeth643
0
151
Member Avatar for mikejs

Hey. You can try this code out, btw, i tried my best to understand your problem, and came out with this response, i hope it is kind of what you were looking for. (just adapt the first 3 lines of code and the last 2 to adapt to your database …

Member Avatar for Zeth643
0
181
Member Avatar for qwertylove

Its really simple, the exception tells you everything. Before you can open a connection you need to assign the route of the connection string to the database. i.e. [CODE]Objconnection.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False;" Objconnection.Open()[/CODE]

Member Avatar for Zeth643
0
240

The End.