Hi...im doing a query tools using vb6 that runs a query in access, How can i do so....im confused...plz guide me....
Query Tools
Collapse
X
-
Tags: None
-
-
-
-
I had do the query n it was success . Thank u.Now i face difficulities in trim character from a coloumn like 101-001 to 101001. It can do by run a query in access directly but in vb6 i cant...
UPDATE Alternator
SET EversparkNo1 = REPLACE(Everspa rkNo1, '-', '')
this 1 i do in access query directlyComment
-
Originally posted by vaniKanabathyI had do the query n it was success . Thank u.Now i face difficulities in trim character from a coloumn like 101-001 to 101001. It can do by run a query in access directly but in vb6 i cant...
UPDATE Alternator
SET EversparkNo1 = REPLACE(Everspa rkNo1, '-', '')
this 1 i do in access query directly
You can run this query through vb also, you ned to execute a non query...Comment
-
-
What is a non query in vb 6.0 ???Originally posted by jamesd0142You can run this query through vb also, you ned to execute a non query...Comment
-
-
Does vb6 not have something simular to this debasisdas?, I use vb2005 and code such as:Originally posted by debasisdasWhat is a non query in vb 6.0 ???
[code=vb]
imports system.data.ole db
Dim oConn As New System.Data.Ole Db.OleDbConnect ion(StrConn)
oConn.Close()
Dim con As New System.Data.Ole Db.OleDbCommand
con.Connection = oConn
con.CommandType = CommandType.Tex t
con.CommandText = "Insert Statement"
oConn.Open()
con.ExecuteNonQ uery()
[/code]
Surely you can do something like this in vb6, right...?Comment
-
There is nothing like non query in VB 6.0.
If you do not know the answer in the version that is clearly mentioned by the OP in the question, no need to post what you think is correct in higher version.
No need to post .NET replies to VB 6.0 questions.
Limit those to .NET forums only.Comment
-
Mine is vb6 platform. Plz do help me in correct query to update my field. Plsssssssss i still finding 4 the answer......Comment
-
try to use like this
[code=vb]
con.BeginTrans 'con is the ADODB connection object
con.Execute "your sql query here"
con.CommitTrans
[/code]Comment
-
Type mismatch error occur.Pls help me edit my coding down here.I need it urgently. Thanks in advance.....plz zzzzzzzz help me.
db_file = App.Path
If Right$(db_file, 1) <> "\" Then db_file = db_file & "\"
db_file = db_file & "Everspark2.mdb "
' Open a connection.
Set conn = New ADODB.Connectio n
conn.Connection String = _
"Provider=Micro soft.Jet.OLEDB. 4.0;" & _
"Data Source=" & db_file & ";" & _
"Persist Security Info=False"
conn.Open
conn.BeginTrans
conn.Execute "UPDATE Alternator SET EversparkNo1 = REPLACE(Everspa rkNo1, " - ", "")"
conn.CommitTran sComment
-
Comment