Search Results

Showing results 1 to 36 of 36
Search took 0.01 seconds.
Search: Posts Made By: jbisono ; Forum: VB.NET and child forums
Forum: VB.NET Aug 26th, 2009
Replies: 3
Views: 235
Posted By jbisono
That means exactly what is says, probably there is a piece of code that is executed before this method and you leave the connection open. make sure you close the connection on that method. usually i...
Forum: VB.NET Aug 24th, 2009
Replies: 4
Views: 468
Posted By jbisono
Oops that is true adatapost my bad.
thanks for correcting me.
Forum: VB.NET Aug 21st, 2009
Replies: 4
Views: 468
Posted By jbisono
add this at the end.
DataGridView1.DataBind()

regards
Forum: VB.NET Jul 29th, 2009
Replies: 1
Views: 398
Posted By jbisono
you need to import System.Data.SqlClient; then you can say this.


Dim con = new SqlConnection("Initial Catalog=DBName;Data Source=ServerName;UID=User;PWD=Pass;");
con.Open()
//Some code here...
Forum: VB.NET Jul 21st, 2009
Replies: 4
Views: 1,115
Posted By jbisono
Ok, good to know.
take care.
Forum: VB.NET Jul 21st, 2009
Replies: 4
Views: 1,115
Posted By jbisono
at the end put DataGrid.DataBind()

also is your datagrid allow to generate the columns automatically, if not i would like to see the datagrid structure and the exact field you are retrieving from...
Forum: VB.NET Jul 17th, 2009
Replies: 3
Views: 1,184
Posted By jbisono
Lets say that in the loadmain you set text for a label like this
Label1.Text = "Load Main"
But you want to do the same thing if you click a button, then create a function called for example...
Forum: VB.NET Jul 15th, 2009
Replies: 7
Views: 510
Posted By jbisono
Take a look of this thread http://www.daniweb.com/forums/thread203951.html

if still need help let me know.
Forum: VB.NET Jul 8th, 2009
Replies: 2
Solved: split data
Views: 402
Posted By jbisono
Let's say you have a variable temp
Dim temp As String = "05/02/2005"
Dim ar() As String = temp.Split("/")
TextBox1.Text = ar(0)

The result of ar(0) is 05 i hope that help you.
Forum: VB.NET Jul 6th, 2009
Replies: 11
Views: 859
Posted By jbisono
In that case you right. and also check what samir said and post back if there was any enhanced.
Forum: VB.NET Jul 6th, 2009
Replies: 11
Views: 859
Posted By jbisono
First of all to retrieve the ID, I would not use DataReader but this

id = Convert.ToInt32(oledbcom.ExecuteScalar())

and for the rest of the code, make sure your connection is open.
Forum: VB.NET Jun 25th, 2009
Replies: 6
Views: 1,244
Posted By jbisono
Ok once you have a connection set up, the easiest way to go is using a dataset you can basically do this. i did not test this.

Dim statement As String = "SELECT EmployeeId, FName FROM tblEmployee"...
Forum: VB.NET Jun 24th, 2009
Replies: 3
Views: 436
Posted By jbisono
Hi,
What do you have so far? what is the part that you do not understand how to do it?.

regards.
Forum: VB.NET Jun 19th, 2009
Replies: 3
Views: 1,017
Posted By jbisono
Forum: VB.NET Jun 11th, 2009
Replies: 3
Views: 1,017
Posted By jbisono
maybe this can help you lets say you want the subtract from two dates and then get the days.



well any way you can find a lot information here
...
Forum: VB.NET Jun 11th, 2009
Replies: 2
Views: 670
Posted By jbisono
Hi, you should open the connection cn.Open() and then cn.Close() also you have a problem and the insert statement you are calling label1.text as lable1.text.

besides that check your table and see...
Forum: VB.NET Jun 11th, 2009
Replies: 6
Views: 499
Posted By jbisono
Can you show more code, beacuse I do not see the connection object something like this



and then
Forum: VB.NET Jun 2nd, 2009
Replies: 3
Views: 309
Posted By jbisono
You can go to this link for more reference.

http://www.connectionstrings.com/
http://www.daniweb.com/forums/thread272.html

In a nut shell you need this

Dim cn As OleDbConnection
cn = New...
Forum: VB.NET May 26th, 2009
Replies: 5
Views: 683
Posted By jbisono
Just double check this, I am not sure. but when you say this
For i As Integer = 1 To CheckBoxList2.Items.Count
I think the checkboxlist index start in 0.
Forum: VB.NET May 26th, 2009
Replies: 5
Views: 683
Posted By jbisono
Forum: VB.NET May 26th, 2009
Replies: 5
Views: 683
Posted By jbisono
Make sure your dropdownlist does not have duplicate values, for example if you result set when you bind the sub category dropdownlist have a duplicate value, when postback is going to go back to...
Forum: VB.NET May 22nd, 2009
Replies: 3
Views: 806
Posted By jbisono
Glad to know you are in the road.

You can do this also replacing the textbox1.text in the insert statement by @name and so one and then add this line for every single parameter


and so on.
...
Forum: VB.NET May 22nd, 2009
Replies: 3
Views: 611
Posted By jbisono
Well, if you said it was working, the first thing i can think is check the path, is something change?

Regards.
Forum: VB.NET May 22nd, 2009
Replies: 5
Views: 597
Posted By jbisono
In a nut shell, you want to make two queries and then put them together in a datagrid result, if that is the case, i supposed that both queries contain the same fields, you can use UNION between two...
Forum: VB.NET May 21st, 2009
Replies: 5
Views: 597
Posted By jbisono
Ok, how are you passing the result set to the datagridview? threw a DataReader or DataSet, their both have a method that return if there is data.

DataReader.HasRows(), return true is the reader...
Forum: VB.NET May 20th, 2009
Replies: 3
Views: 806
Posted By jbisono
well If you know how to make a connection with the database which i think you do, because you are getting data from the db. to insert a new record is much easier.

lets say that we have a table...
Forum: VB.NET May 20th, 2009
Replies: 1
Views: 390
Posted By jbisono
Hi, I do not really understand what is your goal with this code, first of all this line does not seem right to me.

dim token as integer = 'something'

but anyway i think what you want is this.
...
Forum: VB.NET May 19th, 2009
Replies: 6
Views: 797
Posted By jbisono
Try this

Select a.SubCat_Name from SubCategory as a inner join category as b on a.SubCat_Cat_id = b.Cat_id
where b.Cat_name = '" & DirectCast(e.Item.FindControl("chkCategory"), CheckBox).Text &...
Forum: VB.NET May 18th, 2009
Replies: 6
Views: 797
Posted By jbisono
ok, i do not know if this is the best solution but it work.

I test this try to replace your statement in values, notice the event OnItemDataBound that makes the trick.
aspx

<table>
...
Forum: VB.NET May 18th, 2009
Replies: 6
Views: 797
Posted By jbisono
well i can tell you right now why.

you are retreiving category and sub category and the same resultset and your data is show as example.
Category Sub_Categor
Network ...
Forum: VB.NET May 11th, 2009
Replies: 6
Views: 1,322
Posted By jbisono
I think the best way to go is ddambe's way, or doing everything in one spot. this is c#, vb is similiar.

TextBox3.Text = Convert.ToString(Convert.ToDouble(TextBox1.Text) *...
Forum: VB.NET May 7th, 2009
Replies: 2
Views: 358
Posted By jbisono
Hi,
I do not know if this can help but try it
replace dr(0) for dr.GetString(0) and dr.GetString(1).
also try in the select retrieve exact the two fields that you want, i do not know what is the...
Forum: VB.NET May 7th, 2009
Replies: 2
Views: 543
Posted By jbisono
Can you show the insert statement specially the way you are passing those values.

Regards
Forum: VB.NET May 7th, 2009
Replies: 7
Views: 972
Posted By jbisono
Yes because when you say 5/14/2008, the code assume 14 as month and there is not 14 month so change the dd/mm/yyyy to MM/dd/yyyy it should work.

regards
Forum: VB.NET May 7th, 2009
Replies: 7
Views: 972
Posted By jbisono
Oh well sorry to hear that, Lets keep try.

String MyString;
MyString = "1999-09-01 21:34 PM";
//MyString = "1999-09-01 21:34 p.m."; //Depends on your regional settings

DateTime...
Forum: VB.NET May 7th, 2009
Replies: 7
Views: 972
Posted By jbisono
I did not test this, but I think you can use this
DateTime dt;
dt = Convert.ToDateTime("5/20/2008");

I am assuming your are in C#. VB is basically the same thing

hope it works regards
Showing results 1 to 36 of 36

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC