|
Already found the problem The problem was the sql query itself not it works but gives me a diferent error
The sql query i'm using now is the following:
INSERT INTO Substancias ( CODINTERNO, NOMESUBSTANCIA )
SELECT ARTIGOS.CODIGO, ARTIGOS.NOME
FROM ARTIGOS
WHERE (((ARTIGOS.NOME) Like "Cola*" Or (ARTIGOS.NOME) Like "Tinta*") AND ((Exists (SELECT * FROM SUBSTANCIAS WHERE ARTIGOS.CODIGO=SUBSTANCIAS.CODINTERNO))=False));
Much more simple
The problem is when i execute the following code :
Dim SqlCMD As Command
Set SqlCMD = New Command
SqlCMD.CommandText = "CRegSubAdicNulo"
SqlCMD.CommandType = adCmdStoredProc
SqlCMD.ActiveConnection = MyCnn
Set RecSet = SqlCMD.Execute(, , adExecuteNoRecords)
Gives the error "Few Parameters.1 Expected"
|
|
|
|
|
Sorry I don't know VB6 all that well.
|
|
|
|
|
Calferreira wrote: Set RecSet = SqlCMD.Execute(, , adExecuteNoRecords)
Try
Set RecSet = SqlCMD.Execute(adExecuteNoRecords)?
|
|
|
|
|
2 steps to debugging:
1) make it simpeler, until you got something that works
once you got it working, proceed to step 2;
2) re-add complexity, validating each step
SELECT *
FROM ARTIGOS
WHERE ARTIGOS.NOME Like "Cola%"
This query should return rows
BTW, you might want to split that complex query into a few smaller ones.
I are troll
|
|
|
|
|
Found the problem
The problem was,when i executed the query in access was filtering using * for example "Select * From Cars where brand='F*'" as someone posted before by using % instead of * Solved the problem
Thank you all guys you rock!
|
|
|
|
|
Told you that wildcard was fishy!
|
|
|
|
|
Well done
I are troll
|
|
|
|
|
hello please tell me how to convert string into byte values
|
|
|
|
|
|
Not fair, I was writing a witty comment and you totally beat me to the punch with your short, concise and (probably more) helpful answer (then I would have written)!! In short,
|
|
|
|
|
Why don't you share your "witty comment" anyway?; then we can judge you accordingly
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
|
Could you not use CByte()...
Humble Programmer
|
|
|
|
|
Dear All,
i am creating a SSIS package that is executing successfully in 1 mints 30 second with dtexecui utility.
But when i am loading same package with vb.net code package execute successfuly without any error but execute some starting tasks not all.when i am executing same package by using Threads all are going wel.can anyone explain me why package is not executing without Threads successfully.
Ghazanfar Ali
Programmar (MSTS,MCPD)
|
|
|
|
|
hi all,
how to access files in the server from a remote machines.
|
|
|
|
|
Over TCP/IP, WebDAV?
Using Windows Explorer?
Urgency is dependent on payment. Since I'm not paid, it ain't urgent
I are troll
|
|
|
|
|
Is it me or does anyone else still get giddy when they see "urgent" as the thread topic?
|
|
|
|
|
Like a bull on a red flag! I enjoy helping out, but this is killing the fun of it. I can't help wondering if those people cross the streets, shouting "I'm urgentz!!", and in those daydreams I do hope they catch the bus!
Once in a while, you get a sincere "thank you"-post though.
I are troll
|
|
|
|
|
Eddy Vluggen wrote: Once in a while, you get a sincere "thank you"-post though.
Where the hell was I for these??
|
|
|
|
|
EliottA wrote: Where the hell was I for these??
Maybe you were too giddy to notice.
|
|
|
|
|
EliottA wrote: does anyone else still get giddy when they see "urgent" as the thread topic?
"Giddy" isn't a word to use to describe what I feel when I see that.
|
|
|
|
|
Hi Friends
i have created new project it's working well and i would like to deploy the project when i install the deployed setup that time it should create the key value in registry(regedit). is it possible if possible how can i do that.
Thank you in advance
Regards
K. Rajesh Kumar
i am a fresher in software development i have so many doubts in .net so i need to ca
|
|
|
|
|
What do you use to deploy your application? Most installers provide functionality to modify the registry on install
If you have no experience with installers, try searching for "InnoSetup" and/or "InstallShield".
I are troll
|
|
|
|
|
Hi Eddy
Thanks for replay, yes i dont have experience in deployment am using for deployment what we have in visual studio 2005. there where i have to get it.
i am a fresher in software development i have so many doubts in .net so i need to ca
|
|
|
|
|
Hi Rajesh ,
Most of the installer allow you to edit the registry , but if you want to write registry value from a application you can use the following code , in the following code i have used the 'Microsoft.Win32' , which makes our job of writing or registry value easy , the you can add the following code on load event of your main form , the code will try to read a value if not present it will create a key , also if some one goes and change the value , the application will not start net time , saying "This Application is not installed properly" , i hope this solves your problem , the entry is created under
HKEY_LOCAL_MACHINE\SOFTWARE\
Dim regKey As Microsoft.Win32.RegistryKey
Dim ver As String
regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\MyApp", True)
If regKey Is Nothing Then
regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE", True)
regKey.CreateSubKey("MyApp")
regKey.Close()
regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\MyApp", True)
ver = regKey.GetValue("InstallKey", "")
If ver <> "TestInstallKey" Then
regKey.SetValue("InstallKey", "TestInstallKey")
End If
regKey.Close()
Else
ver = regKey.GetValue("InstallKey", "")
If ver <> "TestInstallKey" Then
regKey.SetValue("InstallKey", "TestInstallKey")
MsgBox("This Application is not installed properly")
End
End If
regKey.Close()
End If
Just let me know , if this solves your problem ....
Have a nice day
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|