Click here to Skip to main content
15,912,069 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to add a Horizontal scroll bar to combo Pin
Dave Kreskowiak24-Mar-06 5:12
mveDave Kreskowiak24-Mar-06 5:12 
GeneralRe: How to add a Horizontal scroll bar to combo Pin
raoraya26-Mar-06 16:24
raoraya26-Mar-06 16:24 
GeneralRe: How to add a Horizontal scroll bar to combo Pin
Dave Kreskowiak27-Mar-06 16:52
mveDave Kreskowiak27-Mar-06 16:52 
Questionserialport read barcode Pin
Phan Thi Chien23-Mar-06 21:16
Phan Thi Chien23-Mar-06 21:16 
AnswerRe: serialport read barcode Pin
Dave Kreskowiak24-Mar-06 2:50
mveDave Kreskowiak24-Mar-06 2:50 
QuestionThe attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. Pin
smita_roy23-Mar-06 20:25
smita_roy23-Mar-06 20:25 
AnswerRe: The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version. Pin
Dave Kreskowiak24-Mar-06 4:23
mveDave Kreskowiak24-Mar-06 4:23 
Questionupdate database from datagrid Pin
aqui_i23-Mar-06 19:47
aqui_i23-Mar-06 19:47 
i need to update the database from the datagrid

the error that im getting is:
Additional information: Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.

my code to populate the datagrid is:
Dim i As Integer
Me.DataSet11.Clear()
sqldate = "Select FORMAT(Login , 'hh:nn') as [LOGIN TIME], FORMAT(Logout, 'hh:nn') as [LOGOUT TIME], FORMAT(Dater, 'yyyy/mm/dd') as [Office Date], Overtime, (DateDiff('n', LOGIN, LOGOUT) / 60) - 1 AS [Total Hours], (DateDiff('n', LOGIN, LOGOUT) / 60) - 1 - 8 AS [Excess Hours], (DateDiff('n', FORMAT('9:00', 'hh:nn'), LOGIN) / 60) AS [Late], (DateDiff('n', FORMAT('9:00', 'hh:nn'), LOGIN) / 60) / 0.25 AS [Late in 15 min] from tblTime where IDNo = '" & idn & "' and FORMAT(Dater, 'yyyy/mm/dd') BETWEEN FORMAT('" & d1 & "', 'yyyy/mm/dd') AND FORMAT('" & d2 & "', 'yyyy/mm/dd') Order by Dater Asc" '
Me.OleDbDataAdapter1.SelectCommand.CommandText = sqldate
Me.OleDbDataAdapter1.Fill(Me.DataSet11, "tblTime")
Me.DataGrid1.SetDataBinding(Me.DataSet11, "tblTime")

and my code to update the fields:

If Me.DataSet11.HasChanges Then
Dim sda As New OleDbDataAdapter
Dim scb As New OleDbCommandBuilder
sqldate = "Select FORMAT(Login , 'hh:nn') as [LOGIN TIME], FORMAT(Logout, 'hh:nn') as [LOGOUT TIME], FORMAT(Dater, 'yyyy/mm/dd') as [Office Date], Overtime, (DateDiff('n', LOGIN, LOGOUT) / 60) - 1 AS [Total Hours], (DateDiff('n', LOGIN, LOGOUT) / 60) - 1 - 8 AS [Excess Hours], (DateDiff('n', FORMAT('9:00', 'hh:nn'), LOGIN) / 60) AS [Late], (DateDiff('n', FORMAT('9:00', 'hh:nn'), LOGIN) / 60) / 0.25 AS [Late in 15 min] from tblTime where IDNo = '" & idn & "' and FORMAT(Dater, 'yyyy/mm/dd') BETWEEN FORMAT('" & par & "', 'yyyy/mm/dd') AND FORMAT('" & par2 & "', 'yyyy/mm/dd') Order by Dater Asc" '
sda = New OleDbDataAdapter(sqldate, DBASE.con)
scb = New OleDbCommandBuilder(sda)
sda.Update(Me.DataSet11, "tblTime")
End If


AnswerRe: update database from datagrid Pin
aqui_i23-Mar-06 19:54
aqui_i23-Mar-06 19:54 
QuestionDatabase Conectivity Pin
Sweet Virgo23-Mar-06 18:55
Sweet Virgo23-Mar-06 18:55 
AnswerRe: Database Conectivity Pin
rancir24-Mar-06 4:51
rancir24-Mar-06 4:51 
QuestionHow to free drawing by mousemove in a pictureBox Pin
NatBest23-Mar-06 17:58
NatBest23-Mar-06 17:58 
AnswerRe: How to free drawing by mousemove in a pictureBox Pin
Purple Monk23-Mar-06 22:56
Purple Monk23-Mar-06 22:56 
GeneralRe: How to free drawing by mousemove in a pictureBox Pin
NatBest24-Mar-06 3:40
NatBest24-Mar-06 3:40 
QuestionHow to add/remove databse and tables from Crystal Reports through Vb.net Pin
Ash. R.23-Mar-06 17:19
Ash. R.23-Mar-06 17:19 
AnswerRe: How to add/remove databse and tables from Crystal Reports through Vb.net Pin
Sajid Soomro24-Mar-06 0:12
Sajid Soomro24-Mar-06 0:12 
GeneralRe: How to add/remove databse and tables from Crystal Reports through Vb.net Pin
Ash. R.24-Mar-06 17:45
Ash. R.24-Mar-06 17:45 
Questiondoes anyone knows how to do this? Pin
uglyeyes23-Mar-06 14:07
uglyeyes23-Mar-06 14:07 
QuestionProblems with menus in VS 2005 Pin
mingonn23-Mar-06 13:14
mingonn23-Mar-06 13:14 
QuestionResize an image Pin
New_Coder23-Mar-06 11:46
New_Coder23-Mar-06 11:46 
AnswerRe: Resize an image Pin
Christian Graus23-Mar-06 11:56
protectorChristian Graus23-Mar-06 11:56 
AnswerRe: Resize an image Pin
Guffa23-Mar-06 21:02
Guffa23-Mar-06 21:02 
GeneralRe: Resize an image Pin
New_Coder24-Mar-06 12:28
New_Coder24-Mar-06 12:28 
AnswerRe: Resize an image Pin
Guffa25-Mar-06 7:39
Guffa25-Mar-06 7:39 
GeneralRe: Resize an image Pin
New_Coder28-Mar-06 13:01
New_Coder28-Mar-06 13:01 

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.