create table Software
(
[Name] varchar (255) not null,
[Version] varchar (255) not null,
[F_ID] int not null,
)
Created a table then i altered the table
ALTER TABLE Software
ADD FOREIGN KEY (F_ID) REFERENCES Inventory(P_ID);
nothing gets inputted when i run the script, but when i allow nulls...
'
'Found most parts of this script available at http://www.tek-tips.com/viewthread.cfm?qid=798632
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
'SQL Database Connection
Dim...
How can i loop this instruction
sSoftware = "Insert into Software_List ([Name], [Version]) values ('" & objSoftware.Name & "','" & objSoftware.Version & "')"
mConnection.Execute (sSoftware)
Because at the moment it executes only once and it lists only 1 program in my table, i have been told...
HI all i just wanna give an update on my script. I have done pretty much what i wanted to accomplish! aside from the script spamming new lines each time it has run and also i'd like it to just update its values that have change on the users information in the database.
The script all started...
I also have another question that has been bothering me.
Each time the script has run, it fills its gaps with null cells. If i disable allow nulls my script will not run, this is what i mean.
<a href="http://imgur.com/NzHjl"><img src="http://i.imgur.com/NzHjl.jpg" alt="" title="Hosted by...
Alright thanks for your help! i'll play around with it, i did see my TCP/IP and i set a port to 1433 im pretty sure i can set a static IP from my home router.
I figured it out! im able to go to each of my PC's at home and run the script and i can see all the data they have! this is awesome!
But will this work on an outside line? im currently running it inside my own home network.
mConnection.Open = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=Inventory;Data Source=ADAM-SERVER\SQLEXPRESS; UID=Adam; PWD=qazw"
this is my connection string, i dont know if its the right way for settingup a SQL Login Connection
Hi all
I have been creating a VB script that does a computer inventory and uploads it to a SQL Database called Inventory and the Table is called inventory. I;m using a free version of SQL 2012 and i setup a account which i can use to log into the database and pull data off the server and...
The thing with UPDATE is that i need to reconfig the script each time right? i forgot to mention that this script will be a login script for multiple PC's. But i do have alot of progress and i'll keep messing around with it.
I just need a way to get rid of the null values or somehow combine all...
this is what i have now, i figured out what was wrong with my tables. and now i run the script and it inputs the values in 1 big table, but how do i make it only for 1 line for each computer is my next problem. hah
'
'Found most parts of this script available at...
Im trying to do this
Set colSettings = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
for Each objComputer in colSettings
sHWInformation = "Insert INTO Hardware (System_Name, Manufacturer, Model) VALUES ('" & objComputer.Name & "','" & objComputer.Manufacturer & "','" &...
Okay great I'm able to update multiple columns now, but is there a way to prevent it from spamming the same inserts each time i run the script to test it? like i want it to only update the column if that value has been modified.
thanks
Ok by that you mean i do this
'Only one OS per execute
For Each objItem in colItems
sOSInformation = "Insert INTO OPERATING_SYSTEM (Caption) VALUES ('" & objItem.Caption & "')"
'report = report & "Caption: " & objItem.Caption & vbCrLf
'sOSInformation = sOSInformation & "'" & objItem.Caption...
Another issue has occurred each time i run the script it inserts multiple values each time, i like it to over write that value instead and when it processes the second value into the second column nothing shows only nulls. I'm sure messing around with it i'll get it. But so far its great to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.